A queued Laravel mail fails with User unknown in virtual mailbox table
Fix it fast
Most common cause, 1 of 3The address has no mailbox on the server that hosts the domain
If the address is wrong, correct it in your users table and send again.
php artisan queue:failed
php artisan queue:retry <job-id>Short answer
Recipient address rejected: User unknown in virtual mailbox table is a 550 from Postfix. The recipient's domain is in virtual_mailbox_domains on the SMTP server Laravel uses, but virtual_mailbox_maps has no entry for that address. Correct the address, add the mailbox and rerun postmap, or drop the domain when its mail lives elsewhere. Postfix 3.8 to 3.11.
Which cause do you have?
Log in to the server that MAIL_HOST in your .env points to. Ask Postfix which domains it treats as its own virtual mailbox domains, then look up where the recipient's domain really receives mail. Domain listed and MX points here: cause 1 or 3. Domain listed but MX points to another provider: cause 2.
postconf virtual_mailbox_domains virtual_mailbox_maps
dig +short MX example.comThen find the line you see in this list and open its fix:
- 1The address has no mailbox on the server that hosts the domain
The domain's MX is this server and other addresses at the same domain receive mail fine - 2The server lists a domain whose mailboxes now live at another provider
postconf shows the recipient's domain in virtual_mailbox_domains, while dig shows MX hosts of Google Workspace, Microsoft 365 or another mail service - 3The mailbox was added, but the lookup table was not rebuilt
grep finds the address in the source file, but postmap -q on the same table prints nothing
What does the error look like?
Recipient address rejected: User unknown in virtual mailbox tableExpected response code "250/251/252" but got code "550"The queued notification lands in failed_jobs and every retry fails the same way
Cause 1 of 3
The address has no mailbox on the server that hosts the domain
You seeThe domain's MX is this server and other addresses at the same domain receive mail fine
Check
Postfix answers User unknown in virtual mailbox table when the domain is in virtual_mailbox_domains and the lookup for the exact address finds nothing. Often the user typed the address wrong at sign-up, or the mailbox was deleted after the account was created. Query the table with the address from the failed job.
postconf -h virtual_mailbox_maps
postmap -q user@example.com lmdb:/etc/postfix/vmailboxFix
If the address is wrong, correct it in your users table and send again. If it should exist, create the mailbox. A 550 is a permanent reply, so retrying the same job without a change only fails again.
php artisan queue:failed
php artisan queue:retry <job-id>Verify
The postmap query prints a mailbox path for the address, and the retried job no longer shows in queue:failed.
php artisan queue:failedConfirmed by postfix.org
Cause 2 of 3
The server lists a domain whose mailboxes now live at another provider
You seepostconf shows the recipient's domain in virtual_mailbox_domains, while dig shows MX hosts of Google Workspace, Microsoft 365 or another mail service
Check
A domain listed in virtual_mailbox_domains is a final destination for that Postfix server, so it never looks up the MX. Every address that is not in its own map gets the User unknown reply, even when the real mailbox exists elsewhere. This is common after moving a company's mail to a new provider while the web server keeps the old setup.
postconf -n virtual_mailbox_domainsFix
Remove the domain from virtual_mailbox_domains (or from the database table that setting reads), then reload Postfix. The domain then falls into the default class, and mail for it from your logged-in app goes out through the smtp transport to its MX.
sudo cp /etc/postfix/main.cf /etc/postfix/main.cf.bak
sudo nano /etc/postfix/main.cf # drop the domain from virtual_mailbox_domains
sudo postfix reloadVerify
postconf no longer prints the domain, and a retried Laravel job is accepted with a 250 reply.
postconf -h virtual_mailbox_domainsConfirmed by postfix.org
Cause 3 of 3
The mailbox was added, but the lookup table was not rebuilt
You seegrep finds the address in the source file, but postmap -q on the same table prints nothing
Check
Postfix reads the indexed lookup file, not the text file you edit. When a new line goes into /etc/postfix/vmailbox and postmap is not run, the indexed copy stays old and the new address is still unknown. For MySQL, PostgreSQL or LDAP maps, a query that returns no row has the same effect.
grep -n "user@example.com" /etc/postfix/vmailbox
postmap -q user@example.com lmdb:/etc/postfix/vmailboxFix
Rebuild the table after every edit. Use the same type prefix the virtual_mailbox_maps setting shows; lmdb is used here, older setups may show hash or cdb. Reload Postfix after a main.cf change.
sudo postmap lmdb:/etc/postfix/vmailbox
sudo postfix reloadVerify
postmap -q now prints the mailbox path, and new mail for the address is accepted.
postmap -q user@example.com lmdb:/etc/postfix/vmailboxConfirmed by postfix.org
How do I stop it coming back?
- Keep a domain in only one Postfix address class, and take it out of virtual_mailbox_domains on the same day its MX moves to another provider.
- Run postmap in the same script or deploy step that writes the mailbox file, never by hand afterwards.
- Confirm email addresses at sign-up with a verification link, so typo addresses never reach the notification queue.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine on the same stack: Spotless Laundry, EZ Estimater.