Antispam "gets" the spam too late
| Project: | AntiSpam |
| Version: | 6.x-1.0-beta2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Antispam caught its first piece of spam on my site today. I also have the module "spam" installed, which has previously caught quite a few. Here's the problem: The order in which modules seem to be activated is this: First spam, then the various notification modules such as comment_notify, then finally antispam. This means that spam caught by antispam still passes through the notification modules and readers get emails telling them of the wonderful new comment on the site - but of course it isn't there, because antispam has correctly unpublished it - but readers still get pestered. Since stopping these spurious email was my main reason for installing antispam modules, that isn't very helpful (it is no great problem to delete spam manually, but stopping pestering of readers is critical, because if they get too many, they will stop following the website).
Is it possible to figure out why module spam can get to the spam before the notification modules, but antispam can not?

#1
Hi rth - have you solved this issue by now? I am now experimenting with antispam and am hoping not to have this behavior.
-T
#2
Hi Tobias - no, I haven't a clue how to fix it, and the maintainers don't seem to care.
#3
If it's a matter of the order of the module execution, you can change the weight of the AntiSpam module using Utility module.
http://drupal.org/project/utility
AntiSpam uses hook_comment_submit() and hook_node_submit() function to intercept the comment and node submission. If Spam module and other module uses the same hook functions, then the weight of the module determines which module's hook function to be called first. Thus, you can make AntiSpam act before other modules with the same feature. I hope this will handle your issue.
#4
You wanted to link to
http://drupal.org/project/util
Thanks for the tip, will try it out.
#5
I can set the weight, but I still seem to get comment notifications for new comments that are classed as spam.
Setting the weight shouldn't be necessary anyway, since Comment_notify has a weight of 10, so it should be processed last already. (Antispam has weight 0.) Also Comment_notify does check that the comment is published, ie it does not just blindly send email on every $op == 'insert'.
So what else could be wrong?