Deleting and Re-creating email for a domain in plesk

Let’s say that you need to delete a plesk domain with email and recreate it.

1. Recording the email addresses and passwords (over ssh you can use the command /usr/local/psa/admin/bin/mail_auth_view to show addresses and passwords)

2. Making a copy or renaming of the folder /var/qmail/mailnames/ to something like /var/qmail/mailnames/

3. Deletion of the Alias and addresses

4. Creating as a domain in plesk

5. Manually recreating the email addresses for under the Mail tab for the domain in plesk.

6. Moving the /var/qmail/mailnames/ directory back to its original location or rename back to /var/qmail/mailnames/

7. Ensure that the owner and group of the directory is popuser:popuser by running the command (chown -R popuser:popuser /var/qmail/mailnames/

8. Run the plesk tool to rebuild the mail handlers. (/usr/local/psa/admin/sbin/mchk –with-spam)