Applicable to:
- Plesk for Linux
Symptoms
-
When the mail service is enabled for a domain (i.e. example.com), the following email accounts are set up in Postfix by default:
postmap -s /var/spool/postfix/plesk/virtual | grep @example1.com
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected] -
If an email message is sent to one of those email accounts (e.g. [email protected]), it gets forwarded to the email address that is set under the Plesk Administrator's Profile.
Cause
This behavior is by design: In the following output, it can be seen that all emails sent to the accounts mentioned (for example [email protected]) are forwarded to Plesk Administrator email address (for example [email protected]):
postmap -s /var/spool/postfix/plesk/aliases
drweb [email protected]
kluser [email protected]
postmaster [email protected]
root [email protected]
anonymous [email protected]
drweb-daemon [email protected]
ailer-daemon [email protected]
mailman [email protected]
Resolution
To change this behavior:
-
Connect to the server via SSH;
-
Modify
/etc/aliases
file to forward all messages from desired accounts to another mailbox (for example [email protected]).For instance, for the account [email protected], add the following line into the
/etc/aliases
file:root: [email protected]
-
Run the following command:
# postalias /etc/aliases
-
Verify that the setting applied:
# postmap -s /etc/aliases | grep root
Note: This will not affect accounts created in Plesk with the name [email protected], but if the mailbox does not exist then the message will be forwarded to [email protected] instead of the Plesk Administrator email address.