Symptoms
- One of the following symptoms may apply:
- Unable to create a domain or a mail account under a subscription:
PLESK_ERROR: Error: mailmng-outgoing failed: ERROR:outgoing:domains.subscription_id may not be NULL
Error: mailmng-outgoing failed: ERROR:outgoing:mails.domain_id may not be NULL
Error: mailmng-outgoing failed: ERROR:outgoing:NOT NULL constraint failed: mails.domain_id - Mail tab is missing for a domain and mail service cannot be enabled:
# plesk bin subscription -u example.com -mail_service true
ERR [util_exec] proc_close() failed [‘/usr/local/psa/admin/bin/mailmng-outgoing’ ‘–add-subscription’ ‘–main-domain-name=example.com’ ‘–out-limit=100’] with exit code [1]
mailmng-outgoing failed: ERROR:outgoing:column name is not unique -
Unable to connect with a mail client such as Outlook, thunderbird. The authorization fails with the following error shown in
/var/log/maillog
:authpsa[260371]: No such user '[email protected]' in mail authorization database
- Mail restore fails:
# plesk repair mail example.com
….
Restoring outgoing limits for [email protected]
NOT NULL constraint failed: mails.domain_id
# plesk repair mail example.com
….
Restoring outgoing limits for [email protected]
mails.domain_id may not be NULL
# plesk repair mail example.com
…
Fatal error: plesk::SystemError(You should specify at least one
non-empty ip adress: No such file or directory) - Passwords for mailboxes may be changed frequently for unknown reason
ipAddressId
is missing in IpAddressesCollections
table for one or several domains:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa -Nse “SELECT d.name FROM domains d JOIN DomainServices ds on d.id=ds.dom_id LEFT JOIN IpAddressesCollections ipc on (ds.ipCollectionId = ipc.ipCollectionId ) WHERE ds.type=’mail’ AND ipc.ipCollectionId is NULL”
+———————————-+————-+
| name | ipAddressId |
+———————————-+————-+
| example.com | NULL |
| example2.com | NULL |
Cause
Product issue:
-
#PPPM-12375 “Setting “Outgoing mail mode” to “Send from the specified IP addresses” and then to “Send from domain IP addresses” or “Send from domain IP addresses and use domain names in SMTP greeting” in “Tools & Settings” > “Mail Server Settings” no longer results in multiple issues with mail in Plesk due to the Plesk database getting corrupted.”
Fixed in:- Plesk Obsidian 27 October 2020 (Linux)
Resolution
Workaround
If update is not possible for some reason you may try the following
workaround
Apply the following workaround until the bug is fixed:
Note: if you don’t have root-level SSH access to Plesk server, contact your hosting company to resolve the issue.
For Plesk Obsidian 18.0.29 and later:
- Log in to the server via SSH.
- Back up Plesk database
- Execute the following command to automatically repair missing entries:
# plesk repair db
For Plesk Obsidian 18.0.28 and earlier:
- Log in to the server via SSH.
- Back up Plesk database
- Generate the list of domains affected by the issue:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa -Nse “SELECT d.name FROM domains d JOIN DomainServices ds on d.id=ds.dom_id LEFT JOIN IpAddressesCollections ipc…