Applicable to:
- Plesk
Symptoms
-
When creating a user or changing mail settings in Plesk, the following error is encountered:
PLESK_ERROR: There is no mail service for domain with id = 1. It must be created before call update
PLESK_ERROR: Error: There is no DSMail service for domain with id = 1
-
The following error may appear in migration logs when trying to migrate a domain to a new server without mail service enabled:
PLESK_ERROR: Failed to perform an action on subscription 'example.com': Unable to create mail account 'user@example.com' in subscription 'example.com': Command execution failed on the local server with non-zero exit code.
command: /usr/local/psa/bin/mail --create user@example.com -mailbox true -passwd '***hidden***' -ignore-nonexistent-options
exit code: 1
stdout:
stderr: There is no DSMail service for domain with id = 11
Cause
The Mail service entry is missing in the psa
database for one of the domains due to a database inconsistency or missing mail service
Resolution
-
Open Tools&Settings > Updates and Upgrades to make sure that all components were installed, including mail server. Make sure that mail service is enabled in Tools&Settings > Mail Server Settings:
Note: even if mail service is enabled, disable it and enable again.
-
Connect to the server via SSH.
-
Activate the Mail service for the domain via CLI in order to re-generate the correct entries in the database.
-
Single domain:
# /usr/local/psa/bin/domain --update example.com -mail_service true
-
All the domains:
# for i in `plesk db -Ne"select name from domains;"`; do plesk bin domain -u $i -mail_service true; done
-
-
Open Tools & Settings > Updates and Upgrades to make sure that all components were installed, including mail server. Make sure that mail service is enabled in Tools&Settings > Mail Server Settings:
Note: even if mail service is enabled, disable it and enable again.
-
Connect to the server via RDP.
-
Activate the Mail service for the domain via CLI in order to re-generate the correct entries in the database.
-
Single domain:
C:\>"%plesk_bin%\\mail.exe" --update-service example.com -status enabled
-
All the domains:
Download, unpack, and run the script from the attachment.
-
Comments
1 comment
After runing this script for all domains.... Postfix and Anti Spam is shuting down...you have to restart them manually.
Please sign in to leave a comment.