Articles in this section

Mail delivery does not work: do not list domain in BOTH mydestination and virtual_mailbox_domains

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • Incoming emails are not received, the following error appears in /var/log/maillog:

    CONFIG_TEXT: postfix/trivial-rewrite[772518]: warning: do not list domain example.com in BOTH mydestination and virtual_mailbox_domains

Cause

Postfix misconfiguration causes email routing issues and prevents a certain domain from receiving incoming emails.

Resolution

According to the official Postfix documentation it is prohibited to list virtual mailbox domain name as mydestination domain name.

  1. Connect to the server using SSH.

  2. Correct the necessary mydestination parameter in /etc/postfix/main.cf by setting it to the following value that is compatible with other Plesk configurations:

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

  3. Restart the Postfix service, so that the changes can take effect:

    # service postfix restart

Was this article helpful?

Comments

1 comment
Date Votes
  • When setting mydestination as stated in this article - what happens to mails that are sent to local users such as root (i.e. to users that should belong to the local domain class)? With this configuration, messages sent locally (e.g., by fail2ban) do not get delivered (explanation: the server is run at myserver.example.com and also uses Plesk to manage example.com):

     

    Jul  8 00:58:01 myserver plesk-sendmail[575939]: S575939: from=<fail2ban> to=<root>
    Jul  8 00:58:01 myserver plesk-sendmail[575944]: S575939: add-from: stderr: PASS
    Jul  8 00:58:01 myserver plesk-sendmail[575944]: S575939: py-limit-out: stderr: INFO:__main__:Setting 'X-PPP-Vhost' header to 'myserver.example.com'
    Jul  8 00:58:01 myserver plesk-sendmail[575944]: S575939: py-limit-out: stderr: PASS
    Jul  8 00:58:01 myserver plesk-sendmail[575944]: S575939: check-quota: stderr: SKIP
    Jul  8 00:58:01 myserver postfix/pickup[566421]: 9A1C932058A: uid=0 from=<fail2ban>
    Jul  8 00:58:01 myserver postfix/cleanup[575953]: 9A1C932058A: message-id=<20240707225801.9A1C932058A@myserver.example.com>
    Jul  8 00:58:01 myserver postfix/qmgr[566420]: 9A1C932058A: from=<fail2ban@myserver.example.com>, size=5691, nrcpt=1 (queue active)
    Jul  8 00:58:01 myserver postfix/smtp[575957]: 9A1C932058A: to=<root@myserver.example.com>, orig_to=<root>, relay=none, delay=0.09, delays=0.03/0.01/0.06/0, dsn=5.4.6, status=bounced (mail for myserver.example.com loops back to myself)
    Jul  8 00:58:01 myserver postfix/cleanup[575953]: B0F1C32058D: message-id=<20240707225801.B0F1C32058D@myserver.example.com>
    Jul  8 00:58:01 myserver postfix/bounce[575958]: 9A1C932058A: sender non-delivery notification: B0F1C32058D
    Jul  8 00:58:01 myserver postfix/qmgr[566420]: B0F1C32058D: from=<>, size=7696, nrcpt=1 (queue active)
    Jul  8 00:58:01 myserver postfix/qmgr[566420]: 9A1C932058A: removed
    Jul  8 00:58:01 myserver postfix/smtp[575957]: B0F1C32058D: to=<fail2ban@myserver.example.com>, relay=none, delay=0, delays=0/0/0/0, dsn=5.4.6, status=bounced (mail for myserver.example.com loops back to myself)
    Jul  8 00:58:01 myserver postfix/qmgr[566420]: B0F1C32058D: removed

    0

Please sign in to leave a comment.