Project

General

Profile

Actions

Bug #5971

closed

MailPoet should use commons-no-reply@gc.cuny.edu for bounced emails

Added by Boone Gorges about 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
WordPress Plugins
Target version:
Start date:
2016-08-30
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

From Ray's response to an email thread with IT:

I've taken a look at MailPoet.

They bundle their own version of PHPMailer and use it by default to send their email, which is why our custom "Return-Path" header is not applying to MailPoet emails.

MailPoet does have a hidden option to allow their emails to be sent with WordPress' wp_mail(). However, it requires a code snippet to force this option so it can be toggled in the WP admin area:
https://cfxdesign.com/email-wordpress-posts-to-subscribers-with-mandrill-and-mailpoet/ (Read the "Shared Hosting Problems" section and on)

Boone: We'll probably need to tweak that code snippet so it isn't run on every single page.

Also, it looks like MailPoet has their own configurable bounce setting:
http://docs.mailpoet.com/article/40-automated-bounce-handling-install-guide

If we decide to use this, I do not think it should use the same email address as .


Related issues

Related to CUNY Academic Commons - Bug #5975: Audit all mail plugins on the CommonsResolvedDaniel Jones2016-09-01

Actions
Actions #1

Updated by Boone Gorges about 8 years ago

I haven't looked closely at MailPoet's version of PHPMailer, but I assume there's a good reason they forked it. I'm wary of overriding it just for this purpose.

It appears that the MailPoet wrapper for PHPMailer sets the Sender variable (which determines Return-Path) using the 'bounce_email' config setting. We might consider filtering the 'wysija' option as it comes out of the databsae, and forcing '' for the 'bounce_email' setting across the whole network. This seems like a somewhat lighter solution than forcing the use of wp_mail().

MailPoet's automated bounce handling sounds interesting. We should use it as inspiration when/if we decide to roll out a more general bounce handler for our BP emails. For the time being, though, the important thing is that they go to a real inbox, even if we never look at them, so that we don't send off alarm bells with IT.

Whichever solution you think is best is OK with me, Ray.

Actions #2

Updated by Raymond Hoh about 8 years ago

  • Status changed from Assigned to Resolved

It appears that the MailPoet wrapper for PHPMailer sets the Sender variable (which determines Return-Path) using the 'bounce_email' config setting. We might consider filtering the 'wysija' option as it comes out of the databsae, and forcing '' for the 'bounce_email' setting across the whole network. This seems like a somewhat lighter solution than forcing the use of wp_mail().

Decided to go with your method of setting the 'bounce_email' option. MailPoet has a funky DB options API, so I decided to stick with their API to set the 'Return-Path' header.

Fixed in commit 239cc03.

Actions #3

Updated by Boone Gorges about 8 years ago

echo base64_decode( 'VGhhbmtzLCBSYXkh' );
Actions #4

Updated by Boone Gorges about 8 years ago

  • Status changed from Resolved to Assigned
  • Target version changed from 1.9.26 to 1.9.27

Just got a report of a bounced email with no Return-Path set. Here are the headers (I've removed the recipient email address for privacy):

Return-Path:
Received: from pps.filterd (proofsender1.gc.cuny.edu [127.0.0.1])
    by proofsender1.gc.cuny.edu (8.15.0.59/8.15.0.59) with SMTP id u861amMl026996
    for <...>; Mon, 5 Sep 2016 21:40:21 -0400
Received: from outmail.gc.cuny.edu (outmail.gc.cuny.edu [146.96.128.57])
    by proofsender1.gc.cuny.edu with ESMTP id 257qw4jkqn-27
    for <...>; Mon, 05 Sep 2016 21:40:20 -0400
Received: from lw1c.gc.cuny.edu (172.29.28.143) by WA10B.gc.cuny.edu
 (172.29.28.90) with Microsoft SMTP Server id 8.3.465.0; Mon, 5 Sep 2016
 21:40:17 -0400
Received: by lw1c.gc.cuny.edu (Postfix, from userid 48)    id 2CE3E80D0648; Mon,
  5 Sep 2016 21:40:17 -0400 (EDT)
To: <...>
Subject: Monday 9/12: MARX AND CAPITAL: THE CONCEPT, THE BOOK, THE HISTORY A SERIES OF MONDAY EVENING LECTURES IN POLITICAL ECONOMY BY DAVID HARVEY
X-PHP-Originating-Script: 10009264:class.phpmailer.php
Date: Tue, 6 Sep 2016 01:40:17 +0000
From: "The Center for Place, Culture and Politics" <pcp@gc.cuny.edu>
Reply-To: "The Center for Place, Culture and Politics" <pcp@gc.cuny.edu>
Message-ID: <ODkzMzUzOQWY1281SI337JA1109MSMTQ3MzEyNjAxNzcyNTU1@pcp.gc.cuny.edu>
X-Priority: 3
X-Mailer: PHPMailer (phpmailer.sourceforge.net) [version 2.0.4]
X-email_id: 337
MIME-Version: 1.0
Content-Type: multipart/alternative;
    boundary="b1_883d9808923439ac41567bbacd608f0b" 
Return-Path: apache@lw1c.gc.cuny.edu
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-05_11:,,
 signatures=0
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=87
 malwarescore=0 phishscore=0 adultscore=0 bulkscore=100 classifier=spam
 adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000
 definitions=main-1609060022

This is generated by MailPoet, right? Maybe your whitespace trimming in https://github.com/cuny-academic-commons/cac/commit/239cc0349e89295ad8a828b3e1531cba9104d474 is failng?

Actions #5

Updated by Raymond Hoh about 8 years ago

  • Status changed from Assigned to Resolved

It seems that we also have to set MailPoet's ms_bounce_email option for our custom Return-Path header to take effect.

Should be fixed this time in commit 52d84bb.

Actions #6

Updated by Boone Gorges about 8 years ago

Thanks for looking into this so quickly, Ray! I'm going to deploy your commit as a hotfix, to staunch the flow of bounces.

Actions #7

Updated by Boone Gorges about 8 years ago

  • Related to Bug #5975: Audit all mail plugins on the Commons added
Actions

Also available in: Atom PDF