CiviCRM

Invalid Return-Path results in failed reply forwarding

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed/Completed
  • Affects Version/s: 2.2.2
  • Fix Version/s: 3.0
  • Component/s: CiviMail
  • Labels:
    None

Description

In CRM_Mailing_Event_BAO_Reply::send(), the Return-Path header may have invalid formatting. Specifically, I encountered the form "<person@domain.com>". Certain MTAs with certain configuration (including Exim in this particular case) reject this header and refuse to send the mailing.

My quick fix was to add the following:
$b = $parsed->generateBody();

+ // Fix bug where Return-Path has invalid format.
+ $h['Return-Path'] = trim($h['Return-Path'], '<>');

// FIXME: ugly hack - find the first MIME boundary in
// the body and make the boundary in the header match it

I also noticed the return of $mailer->send() isn't being checked for errors. If it had been, this would have been much easier to catch.

Activity

Hide
Piotr Szotkowski added a comment -
I checked and we don't (at least consciously) generate <>-bound Return-Path headers, but I added that patch anyway (thanks!).

As for the send() checks, we explicitly started ignoring errors in r16940 as part of the CRM-3478 fix.
Show
Piotr Szotkowski added a comment - I checked and we don't (at least consciously) generate <>-bound Return-Path headers, but I added that patch anyway (thanks!). As for the send() checks, we explicitly started ignoring errors in r16940 as part of the CRM-3478 fix.
Hide
Kurund Jalmi added a comment -
Batch move to verification
Show
Kurund Jalmi added a comment - Batch move to verification
Hide
Yashodha Chaku added a comment -
assigning for 3.0 QA
Show
Yashodha Chaku added a comment - assigning for 3.0 QA
Hide
Sushant Paste added a comment -
Tested & verified in r23371.
Show
Sushant Paste added a comment - Tested & verified in r23371.
Hide
Yashodha Chaku added a comment -
assigning for 3.1 verification
Show
Yashodha Chaku added a comment - assigning for 3.1 verification

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: