Imporper Handling of 550 and 503 error
-
I originally posted this thread:
http://wordpress.org/support/topic/doesnt-want-to-send-over-1000-emailsIt turns out the issue is in your code’s inability to handle a 550 (section 3.4. of RFC 5321) or a 503 command out of sequence error (section 4.1.4. of RFC 5321):
http://tools.ietf.org/html/rfc5321The problem is looks like this:
accepted connection from 127.0.0.1:37346 to 127.0.0.1
220 mail.example.com ESMTP service ready
EHLO http://www.example.com
250-mail.example.com says hello
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-CHUNKING
250-8BITMIME
250 DSN
MAIL FROM:<newsletter@example.com>
250 2.1.0 MAIL ok
RCPT TO:<user@example.com>
Rejected recipient <user@example.com> from 127.0.0.1: no such local recipient
550 5.1.1 no such local recipient: <user@example.com> in “RCPT TO:<user@example.com>”
MAIL FROM:<newsletter@example.com>
503 5.5.1 command out of sequence in “MAIL FROM:<newsletter@example.com>”
MAIL FROM:<newsletter@example.com>
503 5.5.1 command out of sequence in “MAIL FROM:<newsletter@example.com>”As you can see, your code does not know how to handle the 550 and 503 errors and for the remainder of the list tries to set the MAIL FROM address. You have 3 options after getting the errors:
– Issue an RSET command and then start over again with a MAIL FROM
– Move to the next RCPT TO in the list
– Issue the QUIT command and start overObviously I’ll be removing the bad email from my list, but your code should be able to handle 550 and 503 errors better.
- The topic ‘Imporper Handling of 550 and 503 error’ is closed to new replies.