Cannot sent message via webmail: User unknown in virtual alias table


2016-11-16 12:55:36 UTC


2017-08-16 17:02:25 UTC


Was this article helpful?

Have more questions?

Submit a request

Cannot sent message via webmail: User unknown in virtual alias table

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.x for Linux
  • Plesk 12.0 for Linux


The following error is shown while trying to send message using webmail:

User unknown in virtual alias table


Could not send message to SMTP server. Check you have access to send messages via the server and that all To/CC/BCC addresses are valid\


Error: SMTP Server rejected email. Returned:550 5.1.1  : Recipient address rejected: User unknown in virtual mailbox table

The Postfix database contains records about domains with mail hosting not from this server:

~# postmap -s /var/spool/postfix/plesk/virtual
admin@domain.tld admin@localhost.localdomain


1) This issue may occur when the /var/spool/postfix/plesk/virtual file contains invalid/incorrect records about a domain. The format of this file should be:

    pattern address, address, ...

Where the pattern matches a mail address. For example:

    postmap -s /var/spool/postfix/plesk/virtual | grep domain.tld
test@domain.tld test@domain.tld

2) Incorrect Postfix configuration on the webmail node (Management Node by default). Most likely, the mchk script was run and broke the Postfix configuration.


  1. Check that the /var/spool/postfix/plesk/virtual file contains valid records. Try to search by domain name, for example:
    postmap -s /var/spool/postfix/plesk/virtual | grep domain.tld

You may see a record like:

    # postmap -s /var/spool/postfix/plesk/virtual | grep domain.tld
domain.tld 1

This means that mail redirection is not valid for domain.tld and the file should be corrected.

a. Create a backup of the /var/spool/postfix/plesk/virtual.db file.

b. Put the information from this file to another temporary file:

    # postmap -s /var/spool/postfix/plesk/virtual >/tmp/bkp/virtual

c. Delete the invalid record that was shown above:

    domain.tld 1

# vi /tmp/bkp/virtual

d. Create a new virtual.db file:

    # postmap /tmp/bkp/virtual

e. Copy the new virtual.db file to /var/spool/postfix/plesk

    # cp /tmp/bkp/virtual.db /var/spool/postfix/plesk

f. Check mail delivery.

Other case

If Postfix files are corrupted completely, or empty:

  1. Create a backup of the current configuration:

    ~# cp -Rp /var/spool/postfix/plesk /var/spool/postfix/plesk.backup
  2. Remove redundant records from the Postfix database:

    ~# cd /var/spool/postfix/plesk/

    ~# for db_file in virtual virtual_domains ; do
    ls -1 --color=never /var/qmail/mailnames > /tmp/domains.txt
    hostname -f >> /tmp/domains.txt
    postmap -s /var/spool/postfix/plesk/$db_file > /tmp/${db_file}_temp
    grep -f /tmp/domains.txt /tmp/${db_file}_temp > /tmp/$db_file
    postmap /tmp/$db_file
    mv /tmp/$db_file.db /var/spool/postfix/plesk/

In Plesk 12.5 this issue can be fixed using the following command:

# plesk repair mail domain.tld
Have more questions? Submit a request
Please sign in to leave a comment.