Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Whenever I e-mail "root", I want it to be forwarded to (instead of a local delivery).

However, I keep getting this:

Feb  9 17:41:54 botmaster postfix/smtp[29969]: B6E0B808F5: to=<>, relay=none, delay=0.01, delays=0.01/0/0.01/0, dsn=5.4.6, status=bounced (mail for loops back to myself)

This is my

# See /usr/share/postfix/ for a commented, more complete version

# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (by FlatTurtle)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname =
#alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
local_transport = error:local delivery is disabled
mydestination = localhost
relayhost = 
mynetworks = [::ffff:]/104 [::1]/128
#mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
relay_domains = /home/mx/postfix_transport
unknown_local_recipient_reject_code = 550 

smtpd_recipient_restrictions =
        check_policy_service unix:private/postgrey,

There are a few ways to disable local delivery, but none of them seem to be working (or at least, I keep getting that message).

dig mx     14679   IN  MX  30     14679   IN  MX  10

dig          604800  IN  CNAME       21600   IN  CNAME         21600   IN  A

dig    444387  IN  CNAME    10265   IN  A

dig     14594   IN  A

dig 4680 IN  A
share|improve this question

3 Answers 3

"mail loops back to myself" has only one cause: postfix is sending out mail to a recipient domain that it is responsible for, such as RCPT TO:, while $myhostname is the MX for

There is no configuration to fix this, since it is what you configured.

Add an alias for root to somewhere NOT on your postfix box, such as:

share|improve this answer
This server is a backup MX server for about 150 domains (including "domain.tld"). $myhostname is actually set to servername.corp.domain.tld, /etc/alias is set to: root: root@domain.tld – Tuinslak Feb 7 '12 at 17:34

Postfix doesn't permit to send email to a destination SMTP server that have the same myhostname in SMTP banner. Then you must set current myhostname to or something else.

myhostname is a machine name, to avoid this problem you could set the MX server name to '' and the backup server name to ''. RFC 1178 says 'Use theme names'.

share|improve this answer
That's actually the case: "myhostname =" (I should've been more clear with "") – Tuinslak Feb 8 '12 at 22:40
Then you trying deliver by smtp to local IP. Check the DNS record for '' (test dns query from backup server) must point to primary server. – Reinaldo Gil Feb 9 '12 at 11:49
I've edited the original post with dig information (and used the real domains this time to avoid any more confusion). – Tuinslak Feb 9 '12 at 17:21
when you send mail to 'user' without the domain, postfix add the value configured in option 'myorigin'. The alias_maps option is used to only by MDA 'postfix/local'. If you are senting mail by smtp, alias_maps isn't evoluated. – Reinaldo Gil Feb 11 '12 at 16:58
do not comment mydestination because the default value is $myhostname value. (use 'postconf -d mydestination' to see the default value). mydestination domains is locally delivered mails. – Reinaldo Gil Feb 11 '12 at 17:02
up vote 2 down vote accepted

I've found a work around by creating a new domain on the nameserver: "".

The MX records point to another SMTP server.

Thus mailing root (which adds the domain) is forwarded and correctly delivered.

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.