Bobcares

How to fix “user unknown in virtual mailbox table” in Postfix?

by | Feb 3, 2019

Everyone expects their emails to work perfectly, but that doesn’t always work.

Sometimes, emails bounce with strange errors. And, one such error is “user unknown in virtual mailbox table” in Postfix servers.

What’s this virtual mailbox table? How can I add the user in this table? Many of these questions may arise in your mind.

At Bobcares, we help server owners resolve such complex email errors as part of our Server Management Services.

Today, we’ll discuss the top 4 reasons for this error and how we fix them.

 

“User unknown in virtual mailbox table” in Postfix – What this error means?

This is one of the common errors in Postifx mail servers when users send emails to their local mailboxes. The exact bounce message looks like this:

[postfix]550 ..: Recipient address rejected: User unknown in virtual mailbox table

 

So, here our Support Experts check the Postfix email logs(/var/log/maillog) to find the origin of the problem. For instance, the email logs shows the error message like this:

postfix/smtpd[14568]: NOQUEUE: reject: RCPT from domain.com[1xx.15x.12x.3]: 550 5.1.1 <test@example.com>: Recipient address rejected: User unknown in virtual mailbox table; from=<postmaster@domain.com> to=<test@example.com> proto=ESMTP helo=<domain.com>

 

This error message shows that emails are not delivered to the mailbox test@example.com. Because, the mail server can’t find this email account on the server.

In other words for the emails to work properly, the mail server must know the exact mail delivery path of a domain. If the exact email delivery path of the domain can’t be found, it throws this error.

 

“User unknown in virtual mailbox table” in Postfix – Causes & Fixes

Now, we’ve a clear understanding of this error. Let’s now discuss the main reasons for this error and how our Support Engineers fix them.

1)Typo in Recipient address

If the recipient mail server can’t find the recipient email account, it would throw the error “User unknown in virtual mailbox table” in Postfix. In other words, a typo in the email address like extra space, dot, missing alphabet, etc. can lead to this error.

Similarly, there are instances where an email account existed on the server got removed or disabled by the customer, or it may moved to another server. In such cases, the recipient server can’t route the emails.

How we fix?

Firstly, our Support Engineers confirm that there are no typo errors in the email address given by the customer. Also, we confirm that the email account is a valid one.

For example in Plesk Postifix servers, we use the below command to check if the email accounts exists or not.

postmap -s /var/spool/postfix/plesk/vmailbox | grep test@example.com

 

If not, we’ll manually add the email account under the domain. In addition to that, we check the DNS connectivity of the domain using tools such as dig, traceroute, etc. and confirm that the domain resolves to the correct server.

 

2) Email routing issues

The email delivery path can be either Local(mailbox within in the server) or Remote(mailbox outside the server). That is, emails are delivered outside the server if the email delivery path is set as remote.

Most mail servers offer the option of specifying the mail delivery path of the domains. But, misconfiguration in the Email routing of these domains can also lead to error.

For example, consider the domain example.com that uses remote mail server Gmail. But, if the Email Routing is set to Local, the mail server tries to treat the domain example.com as local. However, there are no mailboxes on the server. As a result, the mail server rejects the email with error “User unknown in virtual mailbox table“.

 

How we fix?

Firstly, our Support Specialists check the MX records of the recipient domain using the dig command.

dig example.com MX

 

If the email service of the domain is handled remotely, we’ll disable the email service on the local server to ensure that the email works fine. For example in Plesk servers, we disable the email service of a domain using the below command.

plesk bin mail --off example.com

 

Likewise in Postfix servers, we modify the mydestination parameter in the Postfix configuration file /etc/postfix/main.cf to ensure that the server only handles emails for the intended domains.

Most importantly, we make sure to backup the Postfix configuration file before making these changes.

[And, do you need help in fixing this error? Our Support Experts can fix it for you.]

 

3) Bad DNS records

Similarly, “user unknown in virtual mailbox table” error can occur when the MX records of the domain aren’t resolving or the MX record of the domain doesn’t point to the correct server.

We’ve seen instances where the domain holds wrong MX entries after domain migration, IP address switches, etc. In such cases, recipient mail server can’t find the domain on the server and reject the emails.

 

How we fix?

Our Support Engineers verify the MX records of the domain using the below command.

dig domain.com MX

 

And, if we notice missing MX entries or DNS errors, then we correct the DNS entries of the domain to get it fixed.

 

4) Corrupted Mail server configuration

Moreover, the configuration mistakes on the mail server such as SMTP settings, SSL settings, etc. can also lead to this error.

For example in Plesk Postfix servers, we’ve seen cases where incorrect/invalid entries of a domain in the /var/spool/postfix/plesk/virtual file result in this error.

 

How we fix?

Our Hosting Engineers check the validity of the domain entries in the mail server configuration files. For example, in Postfix servers, we use the following command to see if the domain is properly added in the /var/spool/postfix/plesk/virtual file.

postmap -s /var/spool/postfix/plesk/virtual | grep example.com

 

If the domain is missing, we backup this file and add the domain to this virtual.db file.

[Messed up mail server configuration? Get one of our Server Experts to look into your issue and fix it for you.]

 

 

Conclusion

In short, “user unknown in virtual mailbox table” error in Postfix can occur due to bad DNS records, email routing issues, and more. Today, we’ve discussed the top 4 reasons for this error and how ourSupport Engineers fix them.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

SEE SERVER ADMIN PLANS

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

7 Comments

  1. Sinofresh

    Very nice blog.
    Keep posting.

    Reply
  2. RealUser

    Thanks posting this

    Reply
    • Hiba Razak

      Hi,
      Glad to know that our article helps you solves the issue ? .

      Reply
  3. MarcelS

    I use Plesk on my server. but the email is on office365. I had this message when sendig a mail from one domain y.com on the server to a other domain x.com on that same server.
    I had to disable the mail on x.com to get rid of the message.

    Reply
  4. Ed Carroll

    I found that Google is rejecting my mail server altogether is issue. I can email locally okay after rebooting my server.

    Reply
    • Hiba Razak

      Hi,
      Please contact our support team through live chat (click on the icon at right-bottom).

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.