Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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: (top rated answer)

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

I'm able to telnet into port 25 locally (i.e. telnet 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. 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 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/

share|improve this question
up vote 1 down vote accepted

Your mail server is most likely only listening on localhost ( port 25. You need to get it to bind to either all your network interfaces ( 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*         LISTEN  13649/sendmail: acc 

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

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.


Try some of the suggestions here:

Specifically make sure the following is as follows:

-Make sure this line near the top of /etc/postfix/ 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/ I'm guessing I'll have to edit these, but the second line throws me off a bit: mynetworks = [::ffff:]/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* 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/, do you see anything obvious? – Matthew Calabresi Jan 24 '13 at 14:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .