Make WordPress Core

Opened 14 years ago

Closed 11 years ago

Last modified 17 months ago

#11988 closed defect (bug) (invalid)

VERP does not work

Reported by: vladimir_kolesnikov's profile vladimir_kolesnikov Owned by: westi's profile westi
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Mail Keywords: has-patch
Focuses: Cc:


Suppose that we have a custom hook for "phpmailer_init" action which enables VERP support:

function phpmailer_init($phpmailer)
    if (!$phpmailer->smtp) {
        $phpmailer->smtp = new SMTP();

    $phpmailer->smtp->do_verp = true;

But VERP support (in wp-includes/class-smtp.php) is a bit buggy: here's the transcript the session:

 Out: 220 ESMTP Postfix
 In:  EHLO
 Out: 250-SIZE 10240000
 Out: 250-ETRN
 Out: 250-XVERP
 Out: 250-8BITMIME
 Out: 250 DSN
 Out: 501 5.1.7 Bad sender address syntax
 In:  RSET
 Out: 250 2.0.0 Ok

You can see that the server (Postfix) supports VERP (250-XVERP) but the MAIL FROM line is malformed - it lacks space character between ">" and "XVERP":

220 ESMTP Postfix (Ubuntu)
250-SIZE 10240000
250 DSN
250 2.1.0 Ok
250 2.0.0 Ok
221 2.0.0 Bye

You can see that the space character solves the problem.

Attachments (1)

class-smtp.php.diff (463 bytes) - added by vladimir_kolesnikov 14 years ago.

Download all attachments as: .zip

Change History (12)

#1 @vladimir_kolesnikov
14 years ago

A typo: should be

function phpmailer_init(&$phpmailer)

instead of

function phpmailer_init($phpmailer)

in the example.

#2 @vladimir_kolesnikov
14 years ago

  • Cc vladimir@… added

#3 @nacin
14 years ago

This is an external, so this should be reported upstream. Is class-smtp current?

#4 @nacin
14 years ago

  • Milestone changed from Unassigned to Future Release

#5 @hakre
13 years ago

"Upstream" for PHPMailer for PHP 4 is WordPress :) If we do not fix this, there is no fix.

#7 @westi
12 years ago

  • Owner set to westi
  • Status changed from new to assigned

We need to open a new upstream ticket for this in

#8 @bpetty
11 years ago

  • Cc bryan@… added
  • Resolution set to invalid
  • Status changed from assigned to closed

Since no-one else bothered, I went ahead and submitted a ticket to fix VERP on the correct PHPMailer issue tracker where this should be.

This will be resolved on upstream update assuming it is something that should be fixed, and isn't actually a bug with Postfix - we leave that up to PHPMailer to determine.

#9 @bpetty
11 years ago

For what it's worth, this was now applied to PHPMailer after I created the ticket, so it will make it into WordPress on the next upstream update (see #21074 ).

#10 @SergeyBiryukov
11 years ago

  • Milestone Future Release deleted

#11 @bpetty
11 years ago

  • Cc bpetty added; bryan@… removed
Note: See TracTickets for help on using tickets.