As the title says, adding VERP. This patch represents the UI changes to add VERP. To following is the bounce handler that actually does something with teh VERP returns.

for reference: http://en.wikipedia.org/wiki/VERP

CommentFileSizeAuthor
#10 verp0003.txt8.55 KBAjK
#9 verp0002.txt8.48 KBAjK
#8 verp.tar_.gz1.34 KBAjK
verp001.txt5.12 KBAjK

Comments

sutharsan’s picture

AjK, a very interesting approach and also a proven concept. I look forward to the next patch.

moshe weitzman’s picture

Any progress here?

Duncan Pierce’s picture

subscribe

theorichel’s picture

subscribe

marqpdx’s picture

subscribe,
thx

Fredbb’s picture

subscribe
so the patch dos not 'do' anything quite yet right?

AjK’s picture

OK, Gerhard's been poking me, I'll try and work on this next week and get it finished off.

AjK’s picture

StatusFileSize
new1.34 KB

OK, so I did a fair bit of work on this tonight and what I have works across serveral servers I have.

So here goes. This feature is coming as two issues. This one where I have attached a tgz file that contains two new files.

verphandler.pl
This is teh perl script that handles bounces coming in. Now, I'm a sendmail person so I can only describe this in sendmail terminology. Exim, Postfix, etc, you will have to work out what's needed for your MTA.

Basically, you setup an MX domain, eg. verp.example.com and you have all mails for that domain directed to an MTA that can "pipe" mails to a script. In sendmail I would have in the /etc/mail/virtusertable file:-

@verp.example.com verpalias

And in the /etc/mail/aliases file I have:-

verpalias: |/path/to/verphandler.pl

The perl script requires chmod 755 and also the Perl DBD/DBI database libraries.

In my setup I created another MySQL user that is allowed access to a single table and used this MySQL user as the connection in verphandler.pl (see the top of the file that requires config).

For example:-

GRANT ALL ON mydrupaldb.simplenews_verp TO `myuser`@`mymtahost` IDENTIFIED BY `mypass`

This is just a good security step. Should your MTA server get cracked then the most they could do is mess with just that one table.

OK, the next file is simplenews_mail_wrapper.inc. This is a replacement sender for drupal_mail(). The main reason for doing this is drupal_mail() doesn't give the caller access to PHP's mail() $additional_parameter string. In order to get local MTA immediate bounces we need access to the "-f" parameter to ensure the local MTA router back correctly. Just setting "Return-path" as an ordinary header isn't enough for this.

However, using the -f parameters Sendmail will put an annoying "may be forged" into the header and that's bad for spam. So, ensure you tell your MTA to "T(rust) the verp domain. In teh Sendmail world this is done by adding Tverp.example.com to /etc/mail/sendmail.cf, other users will have to RTFM if they don't know what that means.

The next issue to be posted will be the patch for simplenews.module and simplenews.install

AjK’s picture

Version: 5.x-1.2 » 5.x-1.x-dev
Status: Needs work » Needs review
StatusFileSize
new8.48 KB

And here's the patch....

AjK’s picture

StatusFileSize
new8.55 KB

Slightly different version to above. The only difference with this patch is it preserves the "smtp_library" variable setting that may have been in place when we swap in and out out own library.

tomcat1’s picture

I just came across this thread and this seems to be what I need. Is this fairly stable for production use?

AjK, thanks for your efforts. I'm sure people must be using this but there hasn't been any replies to your last post in August so I was just wondering.

How difficult would it be to have simplenews automatically flag recipient email addresses that have bounced, based on what's in simplenews_verp?

Thanks in advance.

sutharsan’s picture

Based on #10 I have created a module for d6. It is not tested and probably needs some bug fixing, but I don't need it yet myselves. If someone wants to continue with it please contact me.

tomcat1’s picture

Sutharsan,

Thanks for your reply. I have to use Drupal 5 for now because of some other modules I'm using. How difficult would a back port to 5.x be for the VERP functionality you've added for D6?

-tc

sutharsan’s picture

The original files and patch are for 5.x so you should be fine with that.

theorichel’s picture

Sutharsan, are you going to commit this patch to the 5 version of Simplenews?

Thanks

sutharsan’s picture

No I have no plans to commit it. Why? 1. no time and resources to do the work and future maintenance; 2. I prefer this in a separate module since only a part of the users need this and it could also be used for other outgoing emails and it currently conflicts with SMTP and (possibly) Mime mail module.

Simplenews is looking for a co-maintainer, that can solve problem 1.

sutharsan’s picture

Status: Needs review » Fixed

I spend a few more hours on documenting the module in my sandbox. The Simplenews Bounce module is now released. Note that this module is currently experimental and not supported. Read the project page and the module's README's for more information. No release is available but it can be checked out from CVS.

AjK, thanks again for your code!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

giorgio79’s picture

We could use PHPMailer BMH (Bounced Mail Handler) which is pretty mature
http://sourceforge.net/projects/bmh/

Perhaps we could have a rule for emails marked as bounced, and in the rule users could customize what to do, such as deleting user, blocking user, unsubscribing user etc etc

raised it as a feature request here #1110332: Use Phpmailer Bounce Mail Handler extension but it might merit its own module so other modules like phpmailer and smtp can integrate with it :)

Also, here is a great blog entry on how to use BMH
http://www.kidmoses.com/blog-article.php?bid=40

bledari’s picture

subscribing

theorichel’s picture

It may be that I am comparing apples and oranges, but I have just switched to CiviCRM and that module claims to handle bounces through VERP.

giorgio79’s picture

This does phpmailer bmh as well
http://drupal.org/project/bounce_handler