issue with Sending mail

Hi, anytime somone sends us an email, it gets kicked back with the following error:

mail for gordon loops back to myself

here is whats in the details.txt file

Reporting-MTA: dns;
X-Postfix-Queue-ID: 6B0691222AA
X-Postfix-Sender: rfc822; **************
Arrival-Date: Mon, 29 Mar 2010 01:29:25 -0600 (MDT)

Final-Recipient: rfc822; ***********
Original-Recipient: rfc822****************
Action: failed
Status: 5.4.6
Diagnostic-Code: X-Postfix; mail for gordon loops back to myself

How can I resolve this?

Many thanks


Something like that can happen if Postfix gets confused as to whether it’s actually the final destination for your email.

You may want to make sure of a few things:

  • Set your hostname to an actual “FQDN” – something like “” rather than just “gordon”. You can check/set that with the “hostname” command on the command line.

  • Whatever your hostname is set to, make sure that appears next to your IP address in /etc/hosts

  • Also make sure that your hostname is listed in the mydestination line of /etc/postfix/


I tried those and am still getting the issue, any other ideas?

Hrm, something about that error message is fishy.

Just for fun, could you paste in the output for the following:

  • Output of the command: hostname

  • Contents of /etc/hosts

  • Output of “postconf -n”



output of hostname is:

/etc/hosts is localhost gordon gordon

The following lines are desirable for IPv6 capable hosts

::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

postconf -n output:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
home_mailbox = Maildir/
inet_interfaces = all
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
mydestination =,, , localhost
myhostname =
mynetworks = [::ffff:]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
sender_bcc_maps = hash:/etc/postfix/bcc
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
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 = hash:/etc/postfix/virtual


This /etc/hosts entry is your problem: gordon gordon

Your hostname isn’t gordon, it’s “”. So Postfix is getting confused.

Try changing that line to read: gordon

made that change and still doing the same thing