What the message looks like
550 5.1.1 <anna@example.com>: Recipient address rejected: User unknown in virtual mailbox tableCommon causes
- Typo in the address, or the mailbox was deleted.
- Address missing from
virtual_mailbox_maps, or alias missing fromvirtual_alias_maps. - Hash file not rebuilt with
postmapafter editing. - Domain listed in
mydestinationand invirtual_mailbox_domains– Postfix then looks for local Unix users (“User unknown in local recipient table”). - After a migration the MX still points to the old server, which no longer has the mailboxes.
Check
- Show Postfix domain classes and maps
postconf mydestination virtual_mailbox_domains virtual_mailbox_maps virtual_alias_maps - Check whether the address is a known mailbox
postmap -q anna@example.com $(postconf -h virtual_mailbox_maps) - Check whether an alias exists for the address
postmap -q anna@example.com $(postconf -h virtual_alias_maps) - Find rejected recipients in the log
journalctl -u postfix --since '1 hour ago' | grep 'User unknown'
Fix
- Have the sender check the address – often it is just a typo.
- Create the mailbox or alias; for hash maps run
postmap /etc/postfix/virtualandpostfix reload. - Put every domain in exactly one class: local domains in
mydestination, virtual ones only invirtual_mailbox_domains. - After migrations check the MX record and TTL so mail does not land on the old server.
- Do not add a catch-all as a workaround: it attracts spam and hides real errors.
FAQ
Is 550 5.1.1 a spam problem?
No. The code is only about the recipient. Your reputation is not affected unless you send in bulk to invalid addresses.
Why does Postfix reject although the user is in the database?
Usually the SQL query in the map returns nothing, e.g. a typo in the query or the wrong column. Test with postmap -q directly against the map file.