Platform: Linux Fedora 27

In a special case Postfix (3.3.0 and 3.2.5 at least) will silently discard 
emails without logging
anything about it.

After moving to a new server a lot of mail was delivered to the luser_relay 
user, and when changing
this user to the main user of the system, all emails were lost with the only 
trace of them in the
maillog as one line of 

postfix/qmgr[29592]: ACA2B201E3B00: removed

after received from amavisd.

The cause of this is the following:

The sequence of users in /etc/passwd had changed.

For historical reasons there are some users and groups in /etc/passwd and 
/etc/groups which 
have been allocated the same number and this is normally working fine 
regardless of the sequence in


user1:x:1715:1715:User A:/home/user1/./:/sbin/nologin
user2:x:1715:1715:User B:/home/user2/./:/sbin/nologin

The ls command will use the latest listed user 

ll /home/user1 -d
drwx--x--x. 3 user2 user2 274 2015-06-23 20:08 /home/user1

Apparently Postfix is doing the same when determining the user of the mailbox 

However, Postfix is then considering mail to user1 as not deliverable, because 
the owner of the
mailbox is textually user2 (which is really only an alias for user1).

Postfix wil then deliver to the luser_relay user, but if this user is a similar 
user e.g. user1, the
email is silently discarded.
I have not tested it without luser_relay.

I would prefer Postfix to deliver the emails or let them stay in the mail 
queue, but if not, at
least it should emit an error message in the log when discarding messages.

- Jørgen Thomsen

Reply via email to