Ticket #11988 (assigned defect (bug))
VERP does not work
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Version: | 3.0 | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | vladimir@… |
Description
Suppose that we have a custom hook for "phpmailer_init" action which enables VERP support:
function phpmailer_init($phpmailer)
{
$phpmailer->IsSMTP();
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 example.com ESMTP Postfix In: EHLO example.com Out: 250-example.com Out: 250-PIPELINING Out: 250-SIZE 10240000 Out: 250-ETRN Out: 250-XVERP Out: 250-ENHANCEDSTATUSCODES Out: 250-8BITMIME Out: 250 DSN In: MAIL FROM:<mailer@example.com>XVERP 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 example.com ESMTP Postfix (Ubuntu) EHLO example.com 250-example.com 250-PIPELINING 250-SIZE 10240000 250-ETRN 250-XVERP 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN MAIL FROM:<mailer@example.com> XVERP 250 2.1.0 Ok RSET 250 2.0.0 Ok QUIT 221 2.0.0 Bye
You can see that the space character solves the problem.
Attachments
Change History
A typo: should be
function phpmailer_init(&$phpmailer)
instead of
function phpmailer_init($phpmailer)
in the example.
This is an external, so this should be reported upstream. Is class-smtp current?
"Upstream" for PHPMailer for PHP 4 is WordPress :) If we do not fix this, there is no fix.
- Owner set to westi
- Status changed from new to assigned
We need to open a new upstream ticket for this in http://code.google.com/a/apache-extras.org/p/phpmailer/issues/list

