The Problem

As root, I send an email to John.

mailx john@example.com

The maillog contains status bounced, unknown user john.

postfix/local to=john@example.com, relay=local, delay=0.04, delays=0.02/0.01/0/0.01, dsn=5.1.1, status=bounced unknown user: "john"

My Setup

On a clean install of CentOS 7, I install Postfix.

yum install postfix

In the /etc/postfix/main.cf file, I use domain example.com.

mydestination = example.com

In the /etc/postfix/main.cf file, I set users home mailbox to Maildir/, and there is no mailbox command.

home_mailbox = Maildir/
mailbox_command = 

In the /etc/postfix/main.cf file, I remove the comment from local recipient maps, to query local user accounts.

local_recipient_maps = unix:passwd:byname $alias_maps

I create a new user, John.

useradd john

I update the aliases database.


I restart Postfix.

systemctl restart postfix

I verify Postfix is running.

systemctl status postfix
. . . active running

John's account exists in /etc/passwd.


The postconf command shows that Unix can be used to query users. This should mean that local_recipient_map = Unix:passwd.byname can be used to query users.

]# postconf -m | grep unix

I am not sure if this is the problem, but the following command produces no output.

postmap -q john@example.com unix:passwd.byname

My question should not be a duplicate of this similar question, as the solution provided in this similar post is to set mydestination to localhost localhost.$mydomain. When I do this, and then restart Postfix, I get the same exact error in the mail log, "bounced - unknown user john.doe". Also, in this other post, there is a much more developed Postfix setup, with mysql. My setup is very simple.

  • Did you issue the newaliases command? ... Postfix aliases – RubberStamp Nov 5 '17 at 12:54
  • Thank you. I forgot about the newaliases command. I have issued the newaliases command as root, restarted Postfix, send a new email to john.doe@example.com as root, and still the issue persists, where "bounced unknown user john.doe" appears in /var/log/maillog. – JeremyCanfield Nov 5 '17 at 13:09
  • This may or may not be related to your problem, but dots are a bad idea in UNIX usernames. That's because john.doe used to be interpreted as user john, group doe. Some utilities still do that to this day. – Satō Katsura Nov 5 '17 at 16:51
  • Thank you for the tip @Satō Katsura. I have replaced john.doe with john, and have verified the issue persists. I have updated my post to show john. – JeremyCanfield Nov 5 '17 at 19:50
  • It's hard to tell what's going on without seeing your entire config and full logs. Which is why debugging Postfix configurations almost never works on Unix & Linux. I really suggest using the postfx-users list instead. – Satō Katsura Nov 7 '17 at 13:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.