LMTP error after RCPT TO 550 5.1.1 user doesn’t exist

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
Hello,


Without any further information, this just looks like the user you're attempting to email doesn't exist. Details on where you're sending to/from and in what circumstance this occurs (all email or just specific addresses) would be necessary to assist you in this case.
 

sparek-3

Well-Known Member
Aug 10, 2002
2,138
260
388
cPanel Access Level
Root Administrator
This will happen if the directory

/home/`/scripts/whoowns example.com`/mail/example.com/contato

exists. This happened when cPanel moved to Dovecot for LMTP. The system doesn't actually read /home/`/scripts/whoowns example.com`/etc/example.com/passwd to determine if that particular email address exists.
 

Stefaans

Well-Known Member
Mar 5, 2002
461
4
318
Vancouver, Canada
Thank you @sparek-3, you just solved a mysterious problem for me!

We were seeing "User doesn't exist" errors for a user that did exist. On inspection, I found that the /home/username/etc/customer-domain.com/passwd file contained an incorrect domain for an email account in question, and subsequently that email address could not receive email. Because I knew where to look, I could manually edit the file and fix the problem.

I do not know how the invalid domain ended up in the passwd file. That part is still a mystery.
 
  • Like
Reactions: cPanelLauren

cPanelAnthony

Administrator
Staff member
Oct 18, 2021
1,041
111
118
Houston, TX
cPanel Access Level
Root Administrator
Hello! Could you try running the following command?

acctinfo $username --mail

Replace "$username" with the cPanel username or account name. Do you see any mail-related errors? If you provide the output here, please censor any domain names or IP addresses. The following article will help if you don't already have the acctinfo alias set.

How to use acctinfo to troubleshoot issues
 

sparek-3

Well-Known Member
Aug 10, 2002
2,138
260
388
cPanel Access Level
Root Administrator
Then how do we fix this?
You would delete - or probably move the affected directory out of the path.

mv /home/`/scripts/whoowns example.com`/mail/example.com/contato /home/`/scripts/whoowns example.com`/mail/example.com/contato-doesnotexist

Change domain name and email account as needed.
 
  • Like
Reactions: cPanelAnthony