I have a weird issue with my postfix installation, also I'm having troubles to debug it because I'm new to the topic. When I check my log lines:

postfix/smtp[29663]: A929510E76D9: to=<root@mail.domain.com>, relay=none, delay=78304, delays=78274/0/30/0, dsn=4.4.1, status=deferred (connect to mail.domain.com[]:25: Connection timed out)

First of all our email addresses are all in the form user@domain.com, so I don't really get why some process is sending emails to root@mail.domain.com which is then trying to connect on itself on port 25 and fails.

Other than that everything works correctly apparently. How can I understand who is issuing this request and for which reason the mailserver tries to connect to itself?


About the mail.domain.com, it might be the value of myorigin in /etc/postfix/main.cf. The local application sends to root, but postfix append @$myorigin. If myorigin is set to a file name, then its value is the content of that file - a convention.

Here is an excerpt from Postfix documentation:

myorigin (default: $myhostname)

The domain name that locally-posted mail appears to come from, and that
locally posted mail is delivered to. The default, $myhostname, is 
adequate for small sites. If you run a domain with multiple machines, you 
should (1) change this to $mydomain and (2) set up a domain-wide alias 
database that aliases each user to user@that.users.mailhost. 

Regarding why it is not directly delivered locally, we would need to see your configuration. If mail.domain.com is not in mydestination, then by default it will be relayed. Also, there is no indication that the mail was sent back to the server. The entry in the log file does not say that. It says that the mail was not received.

The solution, if the issue is as indicated above, is to modify /etc/aliases to include a line

root <some local email to you>

in /etc/aliases and then run sudo newaliases in the command line.

  • 1
    The only reason that I can see for the -1 is that it was 10 months old. I did not realize that, but still, it might help someone else. – Dominic108 Mar 8 '16 at 21:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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