Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a problem with sending authenticated e-mails via SMTP on my hosting with CPanel using Exim.

The problem occurs only when the script send (connection) is performed internally on the server. When I run the same script in an external environment sending will be runs smoothly.

SMTP -> get_lines(): $data is "535 Incorrect authentication data "

I believe the problem is some configuration of WHM / Exim, because until last week was working, but some settings were changed to prevent automated spam submissions.

I do not know which settings are relevant to the solution of the problem. If you need to enter any parameters of WHM setup, just tell me.

share|improve this question

if I understand you right you have this error only when sending to localhost? if so, check that SMTP AUTH is enabled when connecting to lo. using telnet on the SMTP port (presumably 25) used by your script, send the initial EHLO command and check that the proper SMTP auth method used by your script is advertised.

share|improve this answer
I did what you suggested via telnet. My machine (connecting remotely to the server) authenticates without problems, but doing the same processing running ssh server returns the error "incorrect authentication data". – Fred Wuerges Dec 23 '13 at 17:38
can you paste the output of the: telnet localhost 25. what does the server answers after ehlo command? and what type of authentication does your script uses? – alxgomz Dec 23 '13 at 21:18
What I realize is that the problem is occurring only when I enter the DNS. When I type localhost authenticates smoothly: – Fred Wuerges Dec 24 '13 at 15:42
can you check if your configuration contains any acl_smtp_auth? more generally pasting your authenticator configuration might give us some clues: look for driver=plaintext – alxgomz Dec 24 '13 at 18:32
also if you can afford running exim in debug this might give you a lot of useful info. To do so, run the daemon with "-d-all+auth" option. – alxgomz Dec 24 '13 at 18:38
up vote 0 down vote accepted

The problem was the cPHulk (login blocking software). A client script on the server was in the wrong password, so adding the external IP (fixed) of the server's cPHulk blacklist. The solution was to add the IP to the cPHulk whitelist.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.