# (Plesk for Linux) Disabling Default Mail Aliases

Содержание

On Plesk for Linux servers using the Postfix or qmail mail servers, for every hosted domain, a number of mail aliases are automatically created. The aliases have names such as «root@<domain.name>», «postmaster@<domain.name>», «anonymous@<domain.name>», and so on. These are the so-called «reserved mailbox names».

By default, any mail sent to one of these aliases is forwarded to the Plesk administrator’s email address. Spammers may take advantage of this behavior. To counteract this, it is possible to only leave certain mail aliases active, or to disable all mail aliases altogether.

In this topic, you will learn how to specify which mail aliases may forward mail to the Plesk administrator’s email address.

## Prerequisites and Limitations

This topic is only applicable to Plesk for Linux servers, and only if a local Postfix or qmail mail server is handling mail for the Plesk server.

## Disabling Default Mail Aliases

Disabling the default mail aliases is done by configuring the list of mail aliases allowed to forward mail to the Plesk administrator’s email address. To disable one or more default mail aliases, you need to omit them from the list. To disable all of them, you need to leave the list empty.

To configure the list of allowed mail aliases:

1. Добавьте следующие строки в файл panel.ini:

       [mail]
       adminAliases = alias1 alias2 .. aliasN

   For example, to only allow mail sent to the `root` and `postmaster` aliases to be forwarded to the Plesk administrator’s email address, add the following:

       [mail]
       adminAliases = root postmaster

   To prevent mail sent to any of the default mail aliases from being forwarded to the Plesk administrator’s email address, add the following:

       [mail]
       adminAliases =

2. Log in to the Plesk server via SSH as the `root` user.

3. Выполните следующую команду:

       plesk repair mail -y

The list of mail aliases allowed to forward mail to the Plesk administrator’s email address is now updated. Mail sent to any mail alias not listed in the `panel.ini` file will be rejected.

    mail from: aliastest@example.com
    250 2.1.0 Ok
    rcpt to: root@example.com
    550 5.1.1 <root@example.com>: Recipient address rejected: User unknown in virtual mailbox table