cancel
Showing results for 
Search instead for 
Did you mean: 

Incoming e-mail problem

fustbariclation
Champ in-the-making
Champ in-the-making
I'm having trouble setting up incoming e-mail. Outgoing e-mail is working fine.

Looking at the log file, I get the line:

BindExecption: Permission denied
org.subethamail.smtp.server.SMTPServer.start(SMTPServer.java:198)

I've only followed the recommendations to set up the file custom-email-server.properties.

What can I have done wrong? I'm using port 25, and I've disallowed anybody else from using it.
2 REPLIES 2

bucklao
Champ in-the-making
Champ in-the-making
I had the exact same problem when I was setting up the Alfresco smtp server to receive incoming emails.  We are running Tomcat as Tomcat user and not as root and since port 25 is a privledged port we kept receiving this error.  We got around the permission denied error by forwarding port 25 to port 2525. 

Im not sure if youre running Linux but here the command i used:

iptables -t nat -A PREROUTING -p tcp –dport 25 -j REDIRECT –to-ports 2525

After that everything worked.

BuckLao

joe_l3
Star Contributor
Star Contributor
Hi all,

I post this reply because I want to share my SOLUTION.
Bucklao say right!
I had the exact same problem
BindExecption: Permission denied
org.subethamail.smtp.server.SMTPServer.start(SMTPServer.java:198)

The reason is that 25 is a privileged port on Mac/Linux systems. To solve it, I used iptables to map to non-privileged port and configured mail.server.port to another port. Here my configurations:

custom-email-server.properties
email.inbound.enabled=true
email.inbound.unknownUser=anonymous
email.server.enabled=true

email.server.port=25252
email.server.domain=mydomain.it

email.server.allowed.senders=.*
email.server.blocked.senders=

iptables settings
iptables -t nat -A PREROUTING -p tcp –dport 25 -j REDIRECT –to-ports 25252