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/domain.com to something like /var/qmail/mailnames/domain.com.BAK

3. Deletion of the Alias and addresses

4. Creating domain.com as a domain in plesk

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

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

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

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

Leave a Comment