Email Not Listening on Port 25

FIXED.

The line, in /etc/postfix/master.cf, for 'smtp inet . . .' had been commented out. Removed the comment, restarted Postfix, all good.

END EDIT

I am trying to set up an email server per the excellent "Email with Postfix, Dovecot, and MySQL" article.

Unfortunately, while I can send email via a remote client, I cannot receive email. Efforts to send email to an account on the server get this error message:

The recipient server did not accept our requests to connect. Learn more at http://support.google.com/mail/bin/answ … nswer=7720">http://support.google.com/mail/bin/answer.py?answer=7720

[(10) mail.hammeringbits.net. [23.239.10.92]:25: Connection refused]

Searching on this lead me to a Linode article suggesting ports were the problem.

netstat -ntlp

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:8891          0.0.0.0:*               LISTEN      4003/opendkim   
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN      4391/dovecot    
tcp        0      0 0.0.0.0:995             0.0.0.0:*               LISTEN      4391/dovecot    
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      3804/mysqld     
tcp        0      0 0.0.0.0:465             0.0.0.0:*               LISTEN      4356/master     
tcp        0      0 23.239.10.92:53         0.0.0.0:*               LISTEN      5854/named      
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      5854/named      
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      3638/sshd       
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      28746/postgres  
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      5854/named      
tcp6       0      0 :::443                  :::*                    LISTEN      3100/apache2    
tcp6       0      0 :::993                  :::*                    LISTEN      4391/dovecot    
tcp6       0      0 :::995                  :::*                    LISTEN      4391/dovecot    
tcp6       0      0 :::80                   :::*                    LISTEN      3100/apache2    
tcp6       0      0 :::465                  :::*                    LISTEN      4356/master     
tcp6       0      0 :::53                   :::*                    LISTEN      5854/named      
tcp6       0      0 :::22                   :::*                    LISTEN      3638/sshd       
tcp6       0      0 ::1:5432                :::*                    LISTEN      28746/postgres  
tcp6       0      0 ::1:953                 :::*                    LISTEN      5854/named      

I don't see any line for port 25 here, which seems suspicious.

I don't think the firewall is the problem:

iptables -L -n -v:

Chain INPUT (policy ACCEPT 453M packets, 30G bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 417M packets, 69G bytes)
 pkts bytes target     prot opt in     out     source               destination         

So far as I can tell this isn't blocking anything.

So I think the problem is that Postfix (Dovecot?) aren't listening on port 25. The setup article doesn't have any reference to setting any particular option to port 25, so I presume Postfix (Dovecot?) listens to port 25 by default. But it doesn't seem to be doing so here.

I suppose I could have done something in configuration that told Postfix to let Dovecot do the listening on 25, and missed the configuration to make Dovecot actually do that listening.

How do I debug this?

Any help would be appreciated. Thanks.

0 Replies

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct