Symptoms
Unable to send email via WordPress, PHP script or webmail with the following records in /var/log/maillog
file:
sendmail[12628]: handlers_stderr: ERROR:__main__:Rejecting message: system user uid=’10000′ is not allowed to send mail#012DATA REPLY:554:5.7.0 Your message could
not be sent. The user johndoe is not allowed to send email.#012REJECT
May 18 10:37:46 localhost journal: plesk sendmail[12628]: REJECT during call ‘limit-out’ handler
Cause
Outgoing mail limits database does not contain the subscription system user (the systemuser is mentioned in the error):
# sqlite3 /var/lib/plesk/mail/outgoing/data.db
sqlite> .headers on
sqlite> select * from sysusers where name like ‘%johndoe%’;
sqlite>
This has been reported as bug ID PPPM-12944 which will be fixed in future updates.
Resolution
As a workaround follow the steps below:
-
Connect to the server via SSH
-
Create a backup of the outgoing mail database:
# cp -a /var/lib/plesk/mail/outgoing/data.db{,.backup}
-
Add the missing system users into the database:
# plesk db -Ne “SELECT login FROM sys_users” | while read login; do sqlite3 /var/lib/plesk/mail/outgoing/data.db “SELECT * FROM sysusers WHERE name = ‘$login’; ” | grep -q ‘.’; [[ $? -ne 0 ]] && echo $login; done | while read login; do plesk db -Ne “SELECT d.name, su.login FROM domains d, hosting h, sys_users su WHERE d.id=h.dom_id AND h.sys_user_id=su.id AND su.login = ‘$login’ AND webspace_id = 0”; done | while read domain sysuser; do echo “Fixing: $domain –> $sysuser”; plesk sbin mailmng-outgoing –add-subscription –main-domain-name=”$domain”; plesk sbin mailmng-outgoing –add-sysuser –main-domain-name=”$domain” –sysuser=”$sysuser” ; done