Applicable to:
- Plesk for Linux
Symptoms
-
Unable to receive an email on a Plesk server for the
johndoe@example.com
mailbox with the following errors in/var/log/maillog
file:CONFIG_TEXT: dovecot_authdb_plesk[1377]: No such user 'johndoe@example.com' in mail authorization database
dovecot: auth: plesk(johndoe@example.com): Mail account information for user='johndoe@example.com' was not found
dovecot: auth: Debug: userdb out: NOTFOUND#0111
dovecot: service=lda, user=johndoe@example.com, ip=[]. Debug: auth input:
postfix/pipe[14513]: E141A88AA5: to=<johndoe@example.com, relay=plesk_virtual, delay=2, delays=2/0/0/0.06, dsn=4.2.1, status=deferred (Message can not be delivered at this time ) -
The same errors appear for the messages that are forwarded internally after switching from Courier to Dovecot.
Cause
The recipient email account has an empty password in the Plesk database.
Resolution
-
Go to Domains > example.com > Email Addresses > johndoe@example.com.
-
Set a new password into Password and Confirm password fields and press the OK button:
-
Log into the server via SSH.
- Create a backup for psa database:
# plesk db dump psa > /root/psa.sql
-
Execute the command below to create a
/root/affectedaccounts.txt
file that contains all email accounts with the empty passwords:# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin psa -Ne "select concat(m.mail_name,'@',d.name) as mailbox from domains d, mail m, accounts a where m.dom_id=d.id and m.account_id=a.id and m.postbox='true' and a.password =''" > /root/affectedaccounts.txt
-
Run the following command to set a new password for the email accounts from
/root/affectedaccounts.txt
file:# while read i; do /usr/local/psa/bin/mail -u $i -passwd "NEWPASSWORD"; done < /root/affectedaccounts.txt
- Generate as list with mailboxes that currently are in the disabled state but have empty passwords:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin psa -Ne "select concat(m.mail_name,'@',d.name) as mailbox from domains d, mail m, accounts a where m.dom_id=d.id and m.account_id=a.id and m.postbox='false' and a.password =''" > /root/affectedaccountsdisabled.txt
- Execute the command below to set a new passwords for the disabled mailboxes as well:
# wget https://support.plesk.com/hc/en-us/article_attachments/4407744658066/script213928485.tar.gz && tar -xvzf script213928485.tar.gz && chmod +x script.sh && bash script.sh
Note: in the commands from steps №4 and №6 replace NEWPASSWORD with the desired password that will be set for all affected email accounts.
Comments
2 comments
Just another injection, to this discussion, a different solution that can be easily overseen.
I had a customer that every few months was calling me with his emails not working on his phone. I would help him recreate his account, have it working only to have him call me back again after a few months or sometimes even only a few weeks. I'm assuming that maybe he always had an issue as soon as I would get off the phone with him but he just didn't call back right away.
Anyway, I finally had enough and decided to remote login using teamviewer. After troubleshooting for sometime and looking at the maillog, I noticed that when he was creating the account the autocomplete was entering his username which was his email address but was adding one extra empty space after the .com. So basically the username was incorrect but for some reason when you set the account up on the phone plesk establishes a connection for a short period of time and downloads the emails but then disconnects and won't allow to reconnect again until we delete the account and rebuild it again on the phone and again only have a connection for a short period of time. So it wasn't very obvious that the username was the problem since we did get emails to download even though the username was incorrect with the extra empty space at the end.
So just something very silly to watch for, make sure that autocomplete isn't adding empty spaces after the username in this case but maybe this can also happen with the password field.
Hello,
All my email accounts have password set, but still that log entry is shown for all the accounts forwarded ("No such user ..." and "Message can not be delivered ...") .
Plesk version si 18.0.37.
Any suggestion please?
Please sign in to leave a comment.