Postfix mail for loops back to myself Error and Solution

by on May 1, 2009 · 6 comments· LAST UPDATED June 2, 2009

in , ,

I can send and receive mail using, but system generated emails such as bounce backup with an error:

May 1 03:14:52 mail postfix/smtp[62798]: 23CA4BD6B40: to=, relay=none, delay=0.01, delays=0/0/0/0, dsn=5.4.6, status=bounced (mail for loops back to myself)

How do I fix this error?

Postfix did found a dns reply to your email server, but it hasn't been configured to deal with address such as In other words, your server is configured to accept but not as This is well known config problem with virtual domain. To fix this error either add system FQDN to mydestination or relay_domains. Postfix accepts mail for domain listed in virtual_mailbox_domains, virtual_alias_domains, and domains that resolve to IP addresses listed in inet_interfaces and proxy_interfaces. Update mydestination using postconf or by editing file:

mydestination = localhost.$mydomain, localhost,

Once done reload postfix:
# service postfix reload

Tweet itFacebook itG+ itDownload PDF versionFound an error/typo on this page?

{ 6 comments… read them below or add one }

1 Andrés Chandía October 26, 2009 at 8:40 pm

I’ve done it but does not works for me, this is what i got:
at /etc/postfix/
myhostname = example.tdl
myorigin = /etc/mailname
mydestination = example.tdl, localhost, localhost.localdomain

at /etc/mailname

at /etc/hostname


2 zazuge December 5, 2012 at 1:39 pm

another cause is when you have too mail servers with same hostname
it happened for me
watch out for “greeted me with my own hostname”
@Andrés Chandía
i don’t think that is a FQDN
I proper FQDN is “”
or even “”
though it depends if the trailing dot is inluded or not
the important thing is that if you do a ping or nslookup
you get your host (the mail server)
from anywhere in the interenet (the FQDN must be unique)


3 jomo June 2, 2013 at 9:14 pm

Thanks — short and sweet answer. Worked for me.


4 Mac October 15, 2013 at 10:15 pm

Fixed it finally, added in the following:

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

added $mydomain and it worked perfectly!


5 Amjad July 9, 2014 at 5:18 am

Worked for Me, Thanks


6 avi March 2, 2014 at 10:40 pm

Commenting out the line:

relay =

will do it too


Leave a Comment

Tagged as: , , , , , , , , ,

Previous Faq:

Next Faq: