- Plesk for Linux
- Plesk for Windows
Mail service is disabled for a domain in the graphical interface at Plesk > Domains > example.com > Mail > Mail Settings and it is not possible to enable it through the interface, because the Activate mail service on domain button is greyed / grayed out.
Disabling / enabling the mail service for the domain via a command-line interface does not fix the issue:
# plesk bin mail --off example.com
# plesk bin mail --on example.com
Plesk database inconsistency in table entries that concern the status of the mail service for this domain.
On Windows Server, start a command prompt as an Administrator.
Create a backup of the Plesk database:
Plesk for Linux
# plesk db dump psa > psa.sql
Plesk for Windows
C:\> plesk db dump psa > C:\psa.sql
Open Plesk database in MySQL:
# plesk db
Acquire the ID of the domain with disabled mail service by executing this query:
Note: In the example below, the domain name example.com has an ID 167
MYSQL_LIN: mysql> SELECT id FROM DomainServices WHERE type='mail' AND dom_id=(SELECT id FROM domains WHERE name='example.com');
| id |
| 167 |
Change mail service status using the
idnumber obtained in the previous step:
MYSQL_LIN: mysql> UPDATE DomainServices set status=0 WHERE type='mail' AND id=167;
Query OK, 1 row affected (0.00 sec)
- Disable and enable the mail service for the subscription at Plesk > Subscriptions > example.com > Mail > Mail Settings in order to make sure it is now working as expected.