503 valid RCPT command must precede DATA – error cPanel fixed
I did a lot of digging tonight before going back to the basics and checking the simple stuff before I found my answer. Before I tell you exactly how I fixed the 503 error, I’ll share with you the typical fixes for the “503 valid RCPT command must precede DATA” error on a cPanel installation. I pounded my head against the wall because all I was doing was trying to replicate one account against another account that was identical except for the actual address itself and failed to check the small details first. Here’s what I did.
First I found this fix:
“If you ever encounter this error then this means you must check your email before trying to send mail meaning that our mail server requires authentication, which can be achieved using one of these methods:
A) Pop before smtp — check your email for new mail before trying to send email. This adds your IP address to a relayhosts file and allows any email to be sent from that IP address for up to 30 minutes. After 30 minutes you have to authenticate again.
B) Configure your email client to authenticate automatically by checking the “my server requires authentication” box in your email configuration. You will be able to send mail without having to “pop” your mail box first.
If using MicroSoft Outlook, please try the following:
1) Open Outlook
2) Go to Tools/Email Accounts
3) Select the Account with the trouble and click Change
4) Click on More Settings
5) Click on Outgoing Server Tab
6) Click “Outgoing Mail Server (SMTP) requires authentication” and make sure “Use same settings as incoming mail server” is selected (see attached image)
7) Click on “Advanced Tab”
8) Set outgoing Port (SMTP) to 26 (if your hosting account is Linux) or 587 if your hosting account is Windows.
9) Click Ok and then Test Account Settings
If it fails on send then repeat starting from 7.
7) Click on Advanced Tab
8) Set outgoing Port (SMTP) to 465 (See attached)
9) Check the box Beside “The server requires an encrypted connection (SSL)”.
10 ) Click ok and then Test Account Settings ”
Now, this did NOT fix my problem. So, I did some digging like I said.
Next I tried rebuilding my IMAP and Courier by using SSH and running the following command:
That should have fixed it but…
Nope, didn’t fix my problem. You have a guess at how stupid simple the fix was?
The user was over their mail quota and I hadn’t gotten any notification at all. All I had to do was increase their mailbox size from 250MB to 500MB, call them, and have them remove anything over 2MB for e-mail size, and give them some education. Problem solved.
Thank you very good solution!
For cPanel (CentOS) servers the problem is often due to (and fixed as follows)
I’m sure some have stumbled upon this error and googling it renders little help.
It’s been a couple of years since it happened to me but today the problem occurred.
I (accidentatly) ran yum –disableexcludes=repoid –obsoletes update –skip-broken
This updated dovecot or exim and that is a no-no on cpanel servers.
Tto fix this, SSH as root to your server.
Running /usr/local/cpanel/scripts/check_cpanel_rpms sorts out the rpms. However, the problem persits.
Run /scripts/fixquotas (always good to run at times)
then run /scripts/reset_mail_quotas_to_sane_values –force- –confirm
Finally run ‘Repair Mailbox Permissions” from WHM