Symptoms
Mail service is disabled in Subscription > example.com > Mail > Mail Settings and it is not possible to enable it through the control panel because Activate mail service on domain button is greyed out but the subscription is active.
Cause
Database inconsistency.
Resolution
-
Create a backup of Plesk database:
Plesk for Linux
# plesk db dump psa > psa.dump
Plesk for Windows
C:> plesk db dump psa > C:psa.dump
-
Login to Plesk database:
Plesk for Linux
# plesk db
Plesk for Windows
C:> plesk db
-
Find ID with disabled mail service (in the example below, it is 167 ):
mysql> select * from DomainServices where type='mail' and dom_id=(select id from domains where name='example.com');
+-----+--------+------+--------+---------------+----------------+
| id | dom_id | type | status | parameters_id | ipCollectionId |
+-----+--------+------+--------+---------------+----------------+
| 167 | 61 | mail | 2 | 229 | 167 |
+-----+--------+------+--------+---------------+----------------+
1 row in set (0.00 sec)Where
example.com
is a main subscription's domain. -
Change mail service status using
id
from previous step:mysql> update DomainServices set status=0 where type='mail' and id=167;
Query OK, 1 row affected (0.00 sec) - Disable and enable mail service for the subscription at Plesk > Subscriptions >example.com > Mail > Mail Settings