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
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.
Typical scenario
Reception creates a new colleague and the next morning mail to colleague@example.com bounces with '550 5.1.1 ... User unknown in virtual mailbox table'. The account exists in the admin interface, but the Postfix map was not rebuilt. First run postmap -q colleague@example.com hash:/etc/postfix/vmailbox (or the table configured in virtual_mailbox_maps) to see whether Postfix finds the address at all.
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.
How do I spot a typo as the sender?
Check the address character by character, especially dots or hyphens in the name and the domain ending. The bounce names the address exactly as the server saw it. If that does not help, ask the recipient for the correct spelling.
Is a catch-all the answer to such errors?
Rarely. A catch-all accepts every address and thereby collects spam and misdirected mail, and the mailbox fills up quickly. Rejecting in the SMTP dialogue is better because the sender gets feedback at once.
Why does the error appear after a server move?
Often the MX already points to the new server while domains and mailboxes have not yet been created there. Create them before switching DNS and test delivery with swaks --server straight against the new host.