Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've got some small domain names that I host on my home server and would like to get some basic email addresses for those domains. I set up an Ubuntu 12.04 server and followed the instructions here for setting up a mail server with Postfix and Courier:

http://askubuntu.com/questions/54960...n-email-server (top rated answer)

After doing all that, I attempted to set up my info@example.com email address in Thunderbird, but it can't find the server.

I'm able to telnet into port 25 locally (i.e. telnet 127.0.0.1 25) and send myself a test message manually, but I can't telnet into port 25 from another computer. My ISP has informed me that they do not block any ports.

Pingability.com returns the following information about my mail server: There was a problem while talking with the mail server. Got 'ConnectException: Connection refused'

nmap -p 25 example.com yields the following: PORT STATE SERVICE 25/tcp filtered smtp

What are my next steps to troubleshoot/resolve this? I'm at a dead end.

EDIT: here is my /etc/postfix/main.cf: http://pastebin.com/82TbdyjH

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Your mail server is most likely only listening on localhost (127.0.0.1) port 25. You need to get it to bind to either all your network interfaces (0.0.0.0) or to the actual IP address that the system is using on your LAN (possibly 192.168.x.x) type of address.

Additionally, is this computer accessible from the internet? If so you'll need to have the mail server listening on that IP's port as well -OR- use iptables or your home router/switch to forward all WAN traffic coming in to port 25 to your internal IP of your mail server.

You can use netstat to determine what your processes are listening on which IP/port combinations like so:

% netstat -anpt|egrep ":25|Ac|Pro"
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address   Foreign Address   State   PID/Program name   
tcp        0      0 0.0.0.0:25      0.0.0.0:*         LISTEN  13649/sendmail: acc 

In this scenario I'm running sendmail and it's listening on all my network interfaces (0.0.0.0).

Debugging mail issues can be tricky. I've written a blog post for setting up all the various components such as sendmail, spamassassin, dovecot (IMAP), etc. It's geared towards CentOS 5.x but there are some tricks for debugging mail server issues in the comments at the bottom.

UPDATE #1

Try some of the suggestions here: http://forum.slicehost.com/index.php?p=/discussion/1651/postfix-only-listening-on-localhost/p1

Specifically make sure the following is as follows:

-Make sure this line near the top of /etc/postfix/master.cf is not commented out:

smtp      inet  n       -       -       -       -       smtpd

-If you want to listen on port 587 as well, also uncomment the next line:

submission inet n       -       -       -       -       smtpd

-Don't forget to reload Postfix if you make changes here:

$ sudo postfix reload
share|improve this answer
    
Here are a couple lines from my /etc/postfix/main.cf. I'm guessing I'll have to edit these, but the second line throws me off a bit: mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 inet_interfaces = all I'm guessing I'm going to have to change the mynetworks line to 192.168.something.something, correct? –  Matthew Calabresi Jan 24 '13 at 6:52
    
no mynetworks controls what blocks of IPs can relay mail to you, the inet_interfaces = all is what specifies what interfaces to listen on. So what does netstat show for you? Do you have something listening on port 25? –  slm Jan 24 '13 at 7:03
    
Here's my netstat: Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1214/exim4 tcp6 0 0 ::1:25 :::* LISTEN 1214/exim4 Looks like your initial guess was correct, I'm listening on localhost only. –  Matthew Calabresi Jan 24 '13 at 7:09
    
Yup that's the problem, see my updates to the answer. –  slm Jan 24 '13 at 7:26
    
Hm, tried all of that and no improvement. Here is my /etc/postfix/main.cf, do you see anything obvious? pastebin.com/82TbdyjH –  Matthew Calabresi Jan 24 '13 at 14:01
show 3 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.