Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

My home server is on comcast internet so I'm successfully using the comcast smarthost to relay my email out to the web. However, all the emails I send back to the box bounce back to me as shown below and I can't find any clues in the logs.

Delivery of a message from you has exceeded the retry time:
Subject: RE: not working

The following recipients could not be delivered:

I'm using a domain registration site to point at my IP address and I think I've got my MX record set correctly.
This site says the following about my MX record.
Pref Hostname IP Address TTL
30 XX.XX.XXX.XXX 60 min

I've configured my router to forward the following ports to my ubuntu server:
POP 110
POPs 995
IMAP 143
IMAPs 993
SMTPs 465
SMTPs2 587

FYI the webserver and ssh access both work fine. Incoming email seems to be the only thing that isn't working.

From the local machine I can telnet to port 25 and 587 and "HELO" responds as expected. From any machine outside my house telnet won't connect to those ports and times out. I expect port 25 is blocked by comcast but I'm expecting 587 to be useable.

Can anyone suggest next steps for debugging?

thanks for reading!

share|improve this question

It may be a case of blocked ports.

What is the output of /var/log/mail.log

If you are using a firewall maybe you should check any rules considering the ports in question.

For iptables a sudo iptables -L should output the current rules. If the ports are closed you can tell iptables to incoming traffic using:

sudo iptables -A INPUT -p tcp --dport PORT_NUMBER_HERE -j ACCEPT

For a complete HowTo about iptables check here

Also this is a very good tutorial on setting a mail server on Ubuntu 12.04 using Postfix, Dovecot and MySQL for virtual user mailboxes (personally tested on production server)

share|improve this answer

Your Answer


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.