Articles in this section

Incoming emails to certain mailboxes in Plesk server cannot be received: status=bounced (unknown user: "user")

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • Emails that are incoming from an external mail server to any mailbox tied to the example.net domain generate the following errors within the /var/log/maillog:

    CONFIG_TEXT: postfix/qmgr[13769]: 9DF3D8136E: from=john.doe@example.com, size=901, nrcpt=1 (queue active)
    postfix/local[14235]: 9DF3D8136E: to=user@example.net, relay=local, delay=0.11, delays=0.1/0.01/0/0.01, dsn=5.1.1, status=bounced (unknown user: "user")
    postfix/trivial-rewrite[33050]: warning: do not list domain example.net in BOTH mydestination and virtual_mailbox_domains

  • A domain example.net exists as a separate domain in Plesk and is also set as the Plesk server hostname in Tools & Settings > Server Settings

Cause

The Postfix configuration file /etc/postfix/main.cf was customized and the mydestination now contains the affected domain or a $myhostname variable:

# [root@server]# postconf mydestination
mydestination = example.net, localhost.$mydomain, localhost

# [root@server]# postconf mydestination
mydestination = $myhostname, localhost.$mydomain, localhost

The Postfix misconfiguration causes the SMTP server to validate recipient addresses with local_recipient_maps and rejects non-existent recipients. Since the default Plesk postfix mail configuration does not rely on the use of  local_recipient_maps, the users that are being sought there do not exist, which causes the errors.

Resolution

Remove domain example.net or $myhostname from the mydestination parameter of the Postfix configuration by executing these steps:

1. Connect to the server via SSH

2. Back up the Postfix configuration (just in case):

# cp -a /etc/postfix/main.cf{,_backup}

3. Run the following command in order to reset the Postfix configuration to its defaults that are compatible with Plesk:

# plesk repair mail -y

Note: If the issue persists afterwards, change the hostname of the server from Tools & Settings > Server Settings to something else and change it back to a hostname that contains only lower case characters (preferrably, one that is resolvable).

Alternative solution:

1. Connect to the server via SSH

2. Edit file /etc/postfix/main.cf with your favorite command-line text editor

3. Remove the domain example.net or $myhostname variable from mydestination parameter and set the following default values:

CONFIG_TEXT: mydestination = localhost.$mydomain, localhost, localhost.localdomain

4. Restart Postfix by executing the following command:

# systemctl restart postfix

 

 

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.