Dear visitor, in case we do not cover a topic you are looking for, then feel free to ask in our freshly created forum for IT-professionals for a solution. We hope our visitors can help you out with your questions. Have a good one. ~ Tom.

Why does Postfix deliver mails locally instead of relaying them?

We get the following error message if the OP5 host tries to deliver emails:

Oct 23 02:23:44 thuop5 postfix/qmgr[2690]: 8F98A1020C3: from=<>, size=1041, nrcpt=1 (queue active)</>
Oct 23 02:23:44 thuop5 postfix/pickup[5959]: 91C511020BE: uid=299 from=
Oct 23 02:23:44 thuop5 postfix/cleanup[4762]: 91C511020BE: message-id=<>
Oct 23 02:23:44 thuop5 postfix/local[4764]: 8F98A1020C3: to=<>, relay=local, delay=0.03, delays=0.02/0/0/0.01, dsn=5.1.1, status=bounced (unknown user: "user.1")</>

Answer: Postfix evaluates the local hostname from $myhostname variable. This variable holds the FQDN of the server, so the postfix believes he should deliver emails locally. Change the variable in /etc/postfix/ Restart the mail service by using service postfix restart.

mydestination = localhost.$mydomain, localhost
#mydestination = $myhostname, localhost.$mydomain, localhost

After the suggested change, email messages should be delivered via smtp-relay:

Oct 23 10:28:38 thuop5 postfix/qmgr[32155]: 3CFE2100287: from=<>, size=335, nrcpt=1 (queue active)</>
Oct 23 10:28:38 thuop5 postfix/smtp[1600]: 3CFE2100287: to=<>,[]:25, delay=0.17, delays=0.01/0/0.01/0.14, dsn=2.6.0, status=sent (250 2.6.0 <> [InternalId=29356101468970,] 1659 bytes in 0.131, 12,316 KB/sec Queued mail for delivery)</>
Oct 23 10:28:38 thuop5 postfix/qmgr[32155]: 3CFE2100287: removed

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.