Title: [Plugin: Subscribe2] 503 5.5.1 Error: nested MAIL command
Last modified: August 20, 2016

---

# [Plugin: Subscribe2] 503 5.5.1 Error: nested MAIL command

 *  Resolved [bjou](https://wordpress.org/support/users/bjou/)
 * (@bjou)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-subscribe2-503-551-error-nested-mail-command/)
 * Hi,
 * I think I found a bug in the Subscribe2 plugin (or maybe it is in the WP Mail
   SMTP, maybe you can help figuring it out).
    After many hours of investigation
   of the mailserver logs and the tcp streams I found that, as soon as there seems
   to be a unresolvable domain in the RCPT TO, the script behaves odd. Please see
   the protocol:
 * 220 mymailhost.de ESMTP mymailhost.de
    EHLO [http://www.mydomain.de](http://www.mydomain.de)
   250-mymailhost.de 250-PIPELINING 250-SIZE 100145600 250-VRFY 250-ETRN 250-STARTTLS
   250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME
   250 DSN AUTH LOGIN 334 XXXXXXX XXXXXXX== 334 XXXXXXX XXXXXXX 235 2.7.0 Authentication
   successful MAIL FROM:<noreply@mydomain.de> 250 2.1.0 Ok RCPT TO:<noreply@mydomain.
   de> 250 2.1.5 Ok RCPT TO:<xxx@googlemail.com> 250 2.1.5 Ok …many more mail addresses…
   many more mail addresses …many more mail addresses …many more mail addresses 
   RCPT TO:<xxx@hotmail.com> 250 2.1.5 Ok RCPT TO:<xxx@yahoo.de> 250 2.1.5 Ok RCPT
   TO:<xxx@20002live.cn> 450 4.1.2 <xxx@20002live.cn>: Recipient address rejected:
   Domain not found RCPT TO:<xxx@hotmail.com> 250 2.1.5 Ok MAIL FROM:<noreply@mydomain.
   de> 503 5.5.1 Error: nested MAIL command MAIL FROM:<noreply@mydomain.de> 503 
   5.5.1 Error: nested MAIL command MAIL FROM:<noreply@mydomain.de> 503 5.5.1 Error:
   nested MAIL command MAIL FROM:<noreply@mydomain.de> 503 5.5.1 Error: nested MAIL
   command MAIL FROM:<noreply@mydomain.de> 503 5.5.1 Error: nested MAIL command 
   MAIL FROM:<noreply@mydomain.de> 503 5.5.1 Error: nested MAIL command MAIL FROM:
   <noreply@mydomain.de> 503 5.5.1 Error: nested MAIL command MAIL FROM:<noreply@mydomain.
   de> 503 5.5.1 Error: nested MAIL command MAIL FROM:<noreply@mydomain.de> 503 
   5.5.1 Error: nested MAIL command MAIL FROM:<noreply@mydomain.de> 503 5.5.1 Error:
   nested MAIL command
 * This mail does NOT get send because of the many errors at the end. If the unresolvable
   domain is not listed here, then the mail gets send perfectly.
 * Conclusion: If there are unresolvable domains, the script tries to add ANOTHER“
   MAIL FROM” at the end, but “MAIL FROM” is already set at the beginning, so there
   are multime “MAIL FROM” and the postfix does not accept this (nested command),
   which is wise, because there can only be one MAIL FROM).
 * If there is no unresolvable domain, there are NO additional “MAIL FROM” at the
   end.
 * How can we fix this in the code?
 *  -best regards, Bjoern
 * [http://wordpress.org/extend/plugins/subscribe2/](http://wordpress.org/extend/plugins/subscribe2/)

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

 *  [Matt Robinson](https://wordpress.org/support/users/mattyrob/)
 * (@mattyrob)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-subscribe2-503-551-error-nested-mail-command/#post-2923837)
 * [@bjou](https://wordpress.org/support/users/bjou/),
 * I’ve done a few googles on this and it seems linked perhaps to a glitch in the‘
   amavisd’ binary on the server. (So, much further down the line than plugins, 
   WordPress or PHP even)
 * Your server should ideally have a build of amavisd-new as other branches are 
   poorly maintained. can you check this with your hosting provider?
 *  Thread Starter [bjou](https://wordpress.org/support/users/bjou/)
 * (@bjou)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-subscribe2-503-551-error-nested-mail-command/#post-2923838)
 * Hey Matty, thanks for your feedback, I also found these amivisd problems and 
   already asked my provider: amivisd is not(!) in use and I can reproduce the error
   as described above.
 *  [Matt Robinson](https://wordpress.org/support/users/mattyrob/)
 * (@mattyrob)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-subscribe2-503-551-error-nested-mail-command/#post-2923850)
 * [@bjou](https://wordpress.org/support/users/bjou/),
 * Are your hosting providers running any software between scripting level and the
   mail binary? Spam checkers or virus scanners for example.
 * While amivisd has been a culprit like this before it was only because it operates
   in that layer.
 * One check you might be able to do is to attempt to recreate this issues by directly
   calling the mail() function in a PHP script. That would exclude WordPress, the
   PHPMailer library or any plugins as the source of the issue.

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

The topic ‘[Plugin: Subscribe2] 503 5.5.1 Error: nested MAIL command’ is closed 
to new replies.

 * ![](https://ps.w.org/subscribe2/assets/icon-256x256.png?rev=2318630)
 * [Subscribe2 - Form, Email Subscribers & Newsletters](https://wordpress.org/plugins/subscribe2/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/subscribe2/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/subscribe2/)
 * [Active Topics](https://wordpress.org/support/plugin/subscribe2/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/subscribe2/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/subscribe2/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Matt Robinson](https://wordpress.org/support/users/mattyrob/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-subscribe2-503-551-error-nested-mail-command/#post-2923850)
 * Status: resolved