Mailbox is missing in mail authentication database after mchk execution

Created:

2017-03-31 18:48:30 UTC

Modified:

2017-08-08 13:28:15 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Mailbox is missing in mail authentication database after mchk execution

Symptoms 

john.doe@example.com mailbox is missing in mail authentication database after mchk execution or after postfix service restart:

# /usr/local/psa/admin/sbin/mail_auth_view | grep john.doe@example.com
#

The error like the following can be found in /var/log/maillog:

Mar 31 03:21:12 hostname dovecot_authdb_plesk[12558]: No such user 'john.doe@example.com' in mail authorization database

Emails are not delivered to john.doe@example.com user. 

Cause

Database inconsistency: incorrect IP address is assigned to mail service of the domain. mchk utility deletes the mailbox data from mail authentication database for the domain.  

Resolution

A quick workaround: recreate the affected mailbox in mail authentication database by updating password for john.doe@example.com mailbox at Plesk > Domains > example.com > Email Addresses > john.doe@example.com.

 

1. Back up Plesk database (https://support.plesk.com/hc/en-us/articles/213904125)

2. Check IpAddressesCollections table:

MariaDB [psa]> select * from IpAddressesCollections;
+----------------+-------------+
| ipCollectionId | ipAddressId |
+----------------+-------------+
|              1 |           1 |
|              2 |           2 |
|             15 |           1 |
|             16 |           1 |
|             17 |           1 |
|             18 |           2 |
|             19 |           2 |
|             20 |           2 |
|             21 |           2 |
|             22 |           2 |
+----------------+-------------+
10 rows in set (0.00 sec)

 

3. Check IP_Addresses table:

 

MariaDB [psa]> select * from IP_Addresses;
+----+-------------+---------------+-------+--------------------+-------------------+-------+--------+---------------+-------------------+------+
| id | ip_address  | mask          | iface | ssl_certificate_id | default_domain_id | ftps  | status | serviceNodeId | public_ip_address | main |
+----+-------------+---------------+-------+--------------------+-------------------+-------+--------+---------------+-------------------+------+
|  2 | 203.0.113.2 | 255.255.255.0 | eth0  |                  3 |                 1 | false |      0 |            1  | NULL              | true |
+----+-------------+---------------+-------+--------------------+-------------------+-------+--------+---------------+-------------------+------+

 

3. check the domain services the non-existent IP was assigned to:

 

MariaDB [psa]> select * from DomainServices;

+----+--------+-----------+--------+---------------+----------------+

| id | dom_id | type      | status | parameters_id | ipCollectionId |

+----+--------+-----------+--------+---------------+----------------+

|  1 |      1 | mail      |      0 |            1 |              1 |

|  2 |      1 | web       |      0 |            0 |              2 |

| 15 |     10 | mail      |      0 |            6 |             15 |

| 16 |     12 | mail      |      0 |            7 |             16 |

| 17 |     11 | mail      |      0 |            8 |             17 |

| 18 |     10 | web       |      0 |            0 |             18 |

| 19 |     12 | web       |      0 |            0 |             19 |

| 20 |     11 | web       |      0 |            0 |             20 |

| 21 |     13 | web       |      0 |            0 |             21 |

| 22 |     14 | web       |      0 |            0 |             22 |

| 23 |     12 | maillists |      0 |            0 |             23 |

+----+--------+-----------+--------+---------------+----------------+

 

MariaDB [psa]> select id,name from domains;

+----+-----------------------------------+

| id | name                              |

+----+-----------------------------------+

| 10 | example.com                       |

1 | example2.com                      |

| 13 | example3.com                      |

| 12 | example4.com                      |

| 11 | example5.com                      |

| 14 | example6.com                      |

+----+-----------------------------------+

 

4. set the correct IP address ID:

 

# update IpAddressesCollections set ipAddressId = 2 where ipCollectionId = 1;

# update IpAddressesCollections set ipAddressId = 2 where ipCollectionId = 15;

# update IpAddressesCollections set ipAddressId = 2 where ipCollectionId = 16;

# update IpAddressesCollections set ipAddressId = 2 where ipCollectionId = 17;

 

5. Fix the mail authentication database based on the consistent data from Plesk database:

# /usr/local/psa/admin/bin/mchk --without-spam

Have more questions? Submit a request
Please sign in to leave a comment.