We have a python script that sends mail via smtplib. On some specific users I receive error 454. User's email address does not exist on mail server side. From rfc of smtp it seems that negotiation is failed on first steps and mail server did not try to send any email whatsoever.

Our mail client logs:

File "/usr/lib/python2.7/smtplib.py", line 504, in data
    raise SMTPDataError(code, repl)
SMTPDataError: (454, 'Internal error')

The library code should help:

"""SMTP 'DATA' command -- sends message data to server.

Automatically quotes lines beginning with a period per rfc821.
Raises SMTPDataError if there is an unexpected reply to the
DATA command; the return value from this method is the final
response code received when the all data is sent.
(code, repl) = self.getreply()
if self.debuglevel > 0:
    print>>stderr, "data:", (code, repl)
if code != 354:
    raise SMTPDataError(code, repl)  # THIS RAISE AN ERROR

I know that code should be 354 for email to be sent. Is there anyone who could help on the error? I couldn't find any resource that could explain the problem.


Not the best solution, but by restarting the Axigen mail server the problem gone! :|

sudo /etc/init.d/axigen restart

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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