Closed (fixed)
Project:
Simplenews
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Apr 2008 at 10:05 UTC
Updated:
30 May 2011 at 19:56 UTC
Jump to comment: Most recent file
Comments
Comment #1
sutharsan commentedAjK, a very interesting approach and also a proven concept. I look forward to the next patch.
Comment #2
moshe weitzman commentedAny progress here?
Comment #3
Duncan Pierce commentedsubscribe
Comment #4
theorichel commentedsubscribe
Comment #5
marqpdx commentedsubscribe,
thx
Comment #6
Fredbb commentedsubscribe
so the patch dos not 'do' anything quite yet right?
Comment #7
AjK commentedOK, Gerhard's been poking me, I'll try and work on this next week and get it finished off.
Comment #8
AjK commentedOK, 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
Comment #9
AjK commentedAnd here's the patch....
Comment #10
AjK commentedSlightly 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.
Comment #11
tomcat1 commentedI 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.
Comment #12
sutharsan commentedBased 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.
Comment #13
tomcat1 commentedSutharsan,
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
Comment #14
sutharsan commentedThe original files and patch are for 5.x so you should be fine with that.
Comment #15
theorichel commentedSutharsan, are you going to commit this patch to the 5 version of Simplenews?
Thanks
Comment #16
sutharsan commentedNo 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.
Comment #17
sutharsan commentedI 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!
Comment #19
giorgio79 commentedWe 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
Comment #20
bledari commentedsubscribing
Comment #21
theorichel commentedIt 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.
Comment #22
giorgio79 commentedThis does phpmailer bmh as well
http://drupal.org/project/bounce_handler