This is an application for permission to create full projects, and specifically for this project, Bounce.
1) Project overview
The Bounce module collects non-delivery reports generated by remote mail servers in response to emails sent from your Drupal site. It parses these non-delivery reports for response codes, scores those codes, and blocks further emails from being sent to email addresses that have passed a score threshold. This helps prevent your site from looking like a spam source by being a good internet citizen and respecting non-delivery responses, such as a notice that a recipient email account no longer exists.
This module is a rewrite of non-Drupal code that itself resulted from some years of experience running a few-thousand-subscriber mailing list covering the sane end of a topic that, unfortunately, tends to trigger spam filters - because there is a large and obnoxious spam-generating industry over at the other, less sane end of the pool. The default settings in Bounce are geared towards helping to maintain good long-term deliverability of mail under that sort of circumstance.
2) Project page
http://drupal.org/sandbox/exratione/1484526
3) Git repository
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/exratione/1484526.git bounce
4) Drupal version
Drupal 7 only.
5) Other comments
So far as I can see, Drupal doesn't have much in the way of general stand-alone modules with full admin interfaces to manage email list gardening through monitoring of non-delivery reports. Those that do exist are partially featured only, old, and by the look of it not moving much. Given the number of modules focused on mass mailing, that seems like a curious omission. So there's:
a) Bounced Email, a small module that just assembles data from a mailserver rather than acting on it, and doesn't have a D7 version (not that it would be hard to make one):
http://drupal.org/project/bounced_email
b) Simplenews bounce is a similar set of features to Bounced Email, but for Simplenews only, again no D7 version.
http://drupal.org/project/simplenews_bounce
c) Bounce handler is somewhat better, but doesn't seem very user friendly, and not for D7 either.
http://drupal.org/project/bounce_handler
So, the rudiments are there but that's about it. Unlike all of the above, Bounce has fairly comprehensive test code and a robust modular design to let people plug in components via hook implementations to perform non-delivery report processing their own way. It's a foundation for further development with some useful defaults rather than a unit.
6) Manual Reviews of Other Modules for the Review Bonus (Batch 1)
eztexting_gateway
http://drupal.org/node/1394212#comment-6073902
http://drupal.org/node/1394212#comment-6073914
happycaptcha
http://drupal.org/node/1536250#comment-6075142
swiftmailer
http://drupal.org/node/1174572#comment-5782242
http://drupal.org/node/1174572#comment-5793156
7) Manual Reviews of Other Modules for the Review Bonus (Batch 2)
extlink_overlay
http://drupal.org/node/1554554#comment-6100002
nodequeue_context
http://drupal.org/node/1489538#comment-6099204
webmaster_menu
http://drupal.org/node/1420358#comment-6099242
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | drupalcs-result.txt | 12.04 KB | klausi |
Comments
Comment #1
nmudgal commentedHey,
Welcome & thanks for contribution.
While someone does in-depth review please take some time out to resolve the automated review results
http://ventral.org/pareview/httpgitdrupalorgsandboxexratione1484526git
Thanks.
Comment #2
exratione commentedAutomated review results are resolved, barring the one wherein the code is following the guidelines for form callback docs and the review doesn't like that.
Comment #3
sbrattla commentedHi,
Trying to get the module via GIT, but I'm having trouble getting it.
The 'bounce' directory is empty even though GIT says it's done.
I then try 'git pull origin 7.x-1.x', which gives me the following output :
Not sure what's causing the problem, but I'm able to retrieve other modules via GIT so I don't think the issue is rooted in my machine?
Comment #3.0
sbrattla commentedEditing for git branch.
Comment #4
exratione commentedTry:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/exratione/1484526.git bouncerather than
git clone http://git.drupal.org/sandbox/exratione/1484526.git bounceWith the --branch option, that should get you the right branch immediately. If you omit it you only get the empty master locally, and you'd then have to switch to/checkout the remote 7.x-1.x branch.
I think that your issue there with the errors is a result of trying to merge the remote 7.x-1.x branch with the local master (which would be what pull does).
Comment #5
sbrattla commentedThanks,
Managed to get it (not that well versed with GIT).
I did install it and things worked well at first sight. I set it up with a test account which bounced e-mails would return to, and entered the test e-mail account in the "Non-delivery report recipient" field. With regards to this, I've got one comment.
Under the "Connector" tab, If I enter connection details which for some reason does not work, you get an error message. However, the password field gets blanked out, and if you press save again you don't get an error message (you just get the usual green message saying that the changes was saved). I'd say it would make sense to attempt to validate the details by connecting to the account every time the user press save.
Now, i tried to send an e-mail to check if the Return-Path header was added to sent e-mails. It appears that it didn't. I then added some gibberish code to hook_mail_alter in 'bounce.mail.inc' which would make the execution fail, but nothing failed. Somehow, the hook doesn't get invoked on my Drupal. I'm testing on a 7.9 installation.
Can't really say why this happens...but could it have something to do with the hook being in an external file, and Drupal not invoking it since it is specified through bounce_hook_info?
I'll be glad to test things further if you manage to figure out what the root of this issue might be?
Comment #6
sbrattla commentedComment #7
exratione commentedI am developing on 7.12. I guess I'll have to take a look at 7.9 - but it shouldn't make any difference to hook_hook_info().
Item 1: The Password Field in the Connector
--------------------------------------------------------
This is a copy of the functionality in SMTP Authentication Support for entering a password.
EDIT: I misunderstood your description of the bug - I see now that I've tried it again myself. I have committed a fix that ensures that the connection details are rechecked in the case where a password is already set.
Item 2: Return Path
-------------------------
Are you using an SMTP module to send mail? e.g. SMTP Authentication Support
http://drupal.org/project/smtp
If you send mail through the default Drupal mechanism, as explained in the project README, then yes on most setups the Return-Path header will be stripped.
I debated making SMTP Authentication Support required, but there are other modules for sending mail through servers rather than the local mail() function, and I don't want to limit people. So the alternative to that is making it clear in the docs that you MUST use something other than the default in order to send.
Comment #8
sbrattla commentedHi,
I'm sending mails using the SwiftMailer module (which I am waiting to get approved in the applications queue too). However, it appears that your implementation of hook_mail_alter() isn't invoked at all. As far as I understand, this is where the Return-Path is added.
It is drupal_mail() which invokes the various implementations of hook_mail_alter(), and it puzzles me that it doesn't invoke yours. I've added logging statements inside your implementation of the hook, but nothing gets logged. In other words, the hook is never invoked when I attempt to send e-mails.
My module (SwiftMailer) which sends the e-mails can't really be responsible for messing up things. What it does is simply to install itself as the default mail system. Drupal, with its drupal_mail() runs all implementations of hook_mail_alter() before the mail system is loaded (which is where my module comes in)...so something odd must be going on in with Drupal not invoking the hook?
Comment #9
exratione commentedThat is odd.
Can you tell me whether the simpletests work for you for Bounce?
One of the test methods - runTestSentMailToDatabase() - will fail if hook_mail_alter() cannot be invoked.
It all works for me, needless to say, so some digging will be done here on my part to see if I can get it to fail.
Comment #10
exratione commentedOn checking the release notes for 7.12, I see that I require one of the recent features to block sending:
http://drupal.org/node/800434
I suppose that means I should back that out in favor of one of the older methodologies to allow any 7.x version to work. But that doesn't explain the issue you're seeing.
Separately - you probably should be working in 7.12 since it's a security update!
----------
I will work on these issues. No sense in looking at this further until I've figured it out.
Comment #11
exratione commentedI have committed the following changes:
- updated README.txt to make clear the need for mail modules to support setting Return-Path
- moved hook_mail_alter() to the main module file; apparently that hook completely ignores hook_hook_info() directives.
- fixed the issue with the connector settings form and the password
What I need to do separately from further review is:
- write myself a patch for SMTP Authentication Support, as it apparently doesn't support setting a Return-Path. Crazy.
- go carry out a review of mail sending modules to see which of them do support setting a Return-Path.
- then write some more information into the docs to help site owners pick a working solution.
I could address this issue by turning Bounce into a module that also contains an SMTP implementation, but that seems frankly silly. That function should be left to other, dedicated modules, and the real problem here is that there are SMTP implementing modules that don't allow you to set the Return-Path header.
So I'll give Swift Mailer a run through as the next action item, I think, and see if the Return-Path thing works now that I've fixed things.
EDIT: I tried out Swift Mailer and it works for me; Return-Path is correctly set by Bounce, and showing up in the recipient in-box.
Comment #12
sbrattla commentedIn reply to your latest post...
1. The hook_mail_alter() now works in 7.9 after you moved it to the 'bounce.module' file. It is a pity though, because the way you had it before was cleaner.
2. If you depend on functionality introduced in 7.12, why not just require at least version 7.12. I believe this should be possible according to http://drupal.org/node/211747.
3. I realise that the behaviour for the password field is just the same in my module! Could it be an idea to add a piece of text below saying something in the lines of "A password has already been set...hidden for security reasons"...or a line of javascript which adds the text as a greyed out in the actual textbox?
4. The selected protocol isn't preserved when I save settings. I chose POP3, but it went to POP3S after i saved?
5. During cron, I get:
In general, I find it somehow strange that other SMTP modules doesn't support the headers which the Drupal core supports. For instance, the SwiftMailer module just takes whatever headers it finds in $message and adds them to the e-mail. The SwiftMailer library does add a few things itself, but it shouldn't really do any magic on existing headers.
Comment #13
sbrattla commentedFollow up on #12:
Even though i get an error during cron, bounced e-mails are successfully retrieved from the bounce account. In other words, things seems to be working as the Return-Path header gets added successfully and Bounce retrieves bounced e-mails successfully. Seems to be a few warnings that needs to be corrected though. I'll be happy to test it again when you've had the time to look into it.
Comment #14
exratione commentedI have fixed:
- the warnings you were seeing on cron run, which would have shown up for mails with base 64 encoded or quoted-printable parts
- the issue in the connector settings where the protocol selector was not correctly defaulted
Per the official instructions for .info files it's not possible to specify a minimum core version - you can only specific a minimum module version. So what I've done is to put in:
dependencies[] = system (>=7.12)
Which seems devious, but works. If you're still on 7.9 that won't let you install unless you change the .info file to >=7.9.
I'll think about what to do with the password field; your suggestion is a good one.
----
Feel free to give the module a further run-through.
Comment #15
sbrattla commentedI haven't tested the latest change, but I've tested your module a little more and it seems good and works well. It is indeed a really useful module, at least for sites that want to make sure that the data it has on users are up to date!
Comment #16
exratione commentedI have amended the readme file with info on which SMTP-capable mail modules I've tested and found able to set the Return-Path correctly - only about half of those I tried, sadly. I filed some bugs, for what it's worth. If time allows, I'll look into submitting patches.
I've changed the text under the password field to make it more clear that a password is set when one is set.
---
At this point, unless there are further issues uncovered, I think that this module should probably be set to Reviewed & tested by the community - though I would like to see at least one other person look it over and kick the tires.
Comment #17
jahsh commentedDo you have a module for drupal 6 by chance? This would be very helpful.
Comment #18
exratione commentedNo D6 version at this time, as it happens; I was very happy to ditch the whole issue of having to know what other SMTP modules are running in D6. See notes here for some of that, under "Prevent Mail Going Out to Marked Addresses" near the end of the post:
http://www.exratione.com/2011/02/how-to-write-an-email-bounce-processing...
Backporting Bounce to D6 shouldn't be hard - the tough part from the point of view of needing to know things is described in the post above. Well, that and patching the D6 versions of SMTP Authentication Support and PHPMailer for Return-Path support, which I haven't done yet. All of the other issues have been worked out for this D7 version.
But first things first - this module needs to get approved.
Comment #19
sbrattla commentedI've tested the module with Drupal 7.14, and it works just as well as it did before. The error messages i used to receive when cron ran is gone, and the module works in general just as expected.
If it was up to me, i'd set the status to 'reviewed & tested by the community'. However, it might be an idea to get one more person to review it before doing that?
Comment #20
exratione commentedYes, I'd like to see another reviewer look at this. More eyes can't hurt.
Comment #20.0
exratione commentedGit line.
Comment #21
exratione commentedAdding PAReview: review bonus tag.
Comment #22
klausiReview of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
manual review:
require_once dirname(__FILE__) . '/mymodule.inc';Otherwise this looks nearly ready. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #23
exratione commentedAppreciate the care taken there. I will dig in to the details in a few days.
Regarding point (1), it's not clear to me that I am doing something terribly wrong - the module that declares an implementation of hook_hook_info() is a member of the set of all available modules, and the hook acts on all available modules. Nothing in the hook documentation suggests that it's only to be used to organize files in modules other than the declaring module.
http://api.drupal.org/api/drupal/modules%21system%21system.api.php/funct...
OTOH, hook_hook_info() doesn't work for all hooks, which makes it not a great way to organize code - but I was a fair way into using it by the time I figured that out, so decided to forge ahead rather than back out.
Perhaps this is a documentation issue for that hook, if the intent is as you suggest?
Comment #24
exratione commentedChanges from #22 made, back to needs review status.
Comment #24.0
exratione commentedAdding manual review notes.
Comment #25
exratione commentedAdding PAReview: review bonus tag again, round 2.
Comment #26
klausiI'm pretty sure hook_hook_info() should only be used for your own hooks that you want to be loaded from special inc files. Please file a Drupal core documentation issue if you think this is not clear.
Looks RTBC to me now! Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #27
exratione commentedYes, agreed, I asked around and looked at the example of Features use of hook_hook_info(). It's one of those things where the docs are clear when you know the intent, but not so much beforehand.
Comment #28
misc commentedThanks for your contribution, exratione! Welcome to the community of project contributors on drupal.org.
I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.
Thanks to the dedicated reviewer(s) as well.
Comment #29.0
(not verified) commentedReview bonus links again.