PostFix Delivery Problem (Hostname related ?)


I changed the hostname of my VirtualMin (latest version, installed through server using “hostname” linux command. I also noticed a “myhostname” line in “/etc/postfix/” and updated it accordingly.

From now on, I can’t send email to addresses of any virtual servers.

The error I got : (expanded from
user@domain.tld): mail for loops back to myself

(actually the “domain_without_tld” is the Unix username of the main account for the virtual server)

I checked for topics on the forum but everything “seems” fine regarding those topics.

Par of my “” file:

alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = localhost,, localhost
relayhost = 
mynetworks = [::ffff:]/104 [::1]/128
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
virtual_alias_maps = hash:/etc/postfix/virtual
sender_bcc_maps = hash:/etc/postfix/bcc
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination

The line “mydestination” seems different from ones I found on some topics but I never changed this file and topics are a bit outdated.

My “/etc/postfix/virtual” file also contains lines such :

domain.tld domain.tld
user@domain.tld user.domain_without_tld

I left the default option of “user.domain” for login.

Thanks in advance.



Yeah you’ll want to make sure that the “mydestination” line contains your hostname.

Also, make sure that the hostname is listed in /etc/hosts file.


Andrey, thanks for your reply.

In the purpose of helping someone else having same trouble, you need to have BOTH your “hostname” and “localhost” in your “mydestination” line.

It’s quite logical that the system should stop relay mails to these destinations and instead process them :wink: