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

I have posted this question on ServerFault, but it's as relevant to this site, so copying it here because I'm desperate.

I have several problems with my Postfix configuration. Let's start by this one: in the Postfix logs, Postfix tries to connect (SMTP) to instead of is another computer.

Note: I replaced below by a domain I own. DNS resolution for both (a computer running a web server) and (the computer running postfix) is correct.

The test trying to send an email:

ubuntu@mailer:~$ telnet localhost 25
Connected to localhost.
Escape character is '^]'.
220 ESMTP Postfix (Ubuntu)
250-SIZE 10240000
250 DSN
mail from: <>
250 2.1.0 Ok
rcpt to: <>
250 2.1.5 Ok
354 End data with <CR><LF>.<CR><LF>
250 2.0.0 Ok: queued as 3AB5A41927


Sep  6 20:10:15 mailer postfix/smtpd[2785]: connect from localhost[]
Sep  6 20:10:23 mailer postfix/smtp[2779]: connect to[]:25: Connection timed out
Sep  6 20:10:23 mailer postfix/smtp[2779]: 253C641852: to=<>, relay=none, delay=1059, delays=1029/0.02/30/0, dsn=4.4.1, status=deferred (connect to[]:25: Connection timed out)
Sep  6 20:10:40 mailer postfix/smtpd[2785]: 3AB5A41927: client=localhost[]
Sep  6 20:10:48 mailer postfix/cleanup[2789]: 3AB5A41927: message-id=<>
Sep  6 20:10:48 mailer postfix/qmgr[2776]: 3AB5A41927: from=<>, size=422, nrcpt=1 (queue active)
Sep  6 20:10:50 mailer postfix/smtpd[2785]: disconnect from localhost[]

postconf -n:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
local_recipient_maps =
mailbox_size_limit = 0
mydestination =
myhostname =
mynetworks = [::ffff:]/104 [::1]/128
myorigin = $mydomain
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = mysql:/etc/postfix/
virtual_gid_maps = static:5000
virtual_mailbox_base = /mnt/vmail
virtual_mailbox_domains = mysql:/etc/postfix/
virtual_mailbox_limit = 51200000
virtual_mailbox_maps = mysql:/etc/postfix/
virtual_minimum_uid = 5000
virtual_transport = virtual
virtual_uid_maps = static:5000
share|improve this question
Have you check DNS records for as seen by postfix? dig MX – Andrzej A. Filip Sep 7 '13 at 7:27
@AndrzejA.Filip: I was missing the DNS MX record from to Thanks for the help! What about if you add it as an answer, that I will accept? – Blackbird Sep 7 '13 at 10:07

1 Answer 1

up vote 0 down vote accepted

You should check DNS records for as seen by postfix.

dig MX

DNS setup/visibility may different than you assume.

share|improve this answer
@Braiam Actually, this is an answer (it is intended as one, that is), and it solved the problem, and was posted as the solution at the OP's request. Sometimes the question mark can be deceptive. Andrzej A. Filip: With that said, and even though this is a real answer now, I recommend expanding this with an explicit explanation of how to add the necessary record. – Eliah Kagan Sep 7 '13 at 15:39
It is hard to tell "how to add the DNS record" without knowing DNS server or DNS service provider you use (some offer custom web interface). – Andrzej A. Filip Sep 7 '13 at 15:49
Indeed, and OP is vague enough. Also @EliahKagan , in the LQR queue, we can't see comments of the questions, that's why I interpreted it as a comment. – Braiam Sep 7 '13 at 15:58
@AndrzejA.Filip Right, but even general information to that effect might help set some other people with similar problems--some of whom may well be less knowledgeable than the author of this question--on the right path. Of course, it's your choice. – Eliah Kagan Sep 7 '13 at 16:00

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.