Add mail users to aliases.db plesk

To add mail users to the aliases.db file in Plesk, you can follow these steps:

Method 1: Using the Plesk Control Panel

  1. Log in to the Plesk Control Panel as an administrator.
  2. Go to Mail > Mail Users.
  3. Select the mail user you want to add to the aliases.db file.
  4. Click on the Edit button next to the mail user.
  5. Scroll down to the Forwarding section.
  6. Click on the Add Forwarding button.
  7. Enter the alias you want to add (e.g., [email protected]) and select the mail user from the dropdown list.
  8. Click OK to save the changes.

Method 2: Using the command line

  1. Connect to your server using SSH.
  2. Run the following command to add an alias for a mail user:
    plesk bin mail -a <alias> <mail_user>

    Replace <alias> with the alias you want to add (e.g., [email protected]) and <mail_user> with the mail user you want to add the alias to (e.g., [email protected]).

For example:

plesk bin mail -a [email protected] [email protected]

This will add the alias [email protected] to the mail user [email protected].

Method 3: Editing the aliases.db file manually

  1. Connect to your server using SSH.
  2. Open the aliases.db file in a text editor using the following command:
    plesk bin db -e "SELECT * FROM aliases"

    This will display the contents of the aliases.db file.

  3. Add a new line to the file with the following format:
    <alias> <mail_user>

    Replace <alias> with the alias you want to add (e.g., [email protected]) and <mail_user> with the mail user you want to add the alias to (e.g., [email protected]).

For example:

[email protected] [email protected]
  1. Save the changes to the file.

Note: Be careful when editing the aliases.db file manually, as incorrect changes can cause issues with your mail server. It's recommended to use one of the other methods to add mail users to the aliases.db file.