Support » Plugin: Subscribe2 » Imporper Handling of 550 and 503 error

  • Resolved shabicht

    (@shabicht)


    I originally posted this thread:
    http://wordpress.org/support/topic/doesnt-want-to-send-over-1000-emails

    It 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/rfc5321

    The 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 over

    Obviously I’ll be removing the bad email from my list, but your code should be able to handle 550 and 503 errors better.

    http://wordpress.org/plugins/subscribe2/

Viewing 3 replies - 1 through 3 (of 3 total)
  • mattyrob

    (@mattyrob)

    @shabicht,

    Thanks for the bug report but there is very little I can do about this. Subscribe2 uses the core WordPress mail() function which is in turn a wrapper for the PHPMailer class. This then uses the PHP mail() function which is most likely using the sendmail binary on the server and it is that binary which translate and sends the appropriate mail commands.

    Subscribe2 is therefore several steps removed from the binary and relies on other layers to send emails, it gets no direct response for each email attempt other than a boolean response from the PHP mail() function.

    shabicht

    (@shabicht)

    Well, if nothing else, the issue has been logged and maybe someone will come across this thread next time the issue happens.

    mattyrob

    (@mattyrob)

    @shabicht,

    Indeed. It may be of use to someone else if they face the same issue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Imporper Handling of 550 and 503 error’ is closed to new replies.