As root, I send an email to John.
The maillog contains status bounced, unknown user john.
postfix/local firstname.lastname@example.org, relay=local, delay=0.04, delays=0.02/0.01/0/0.01, dsn=5.1.1, status=bounced unknown user: "john"
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.
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 unix
I am not sure if this is the problem, but the following command produces no output.
postmap -q email@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
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.