SA Bugzilla – Bug 7449
Promotional mail tagging
Last modified: 2018-08-28 04:34:13 UTC
Hello, Theses Days we receive many Promotional mail , be in form of advertisement, newsletter, mailing list, some bulk marketing mails...etc. which irritated many specially in work mailbox. Google's Gmail has got a better algorithm to filter and put it under tab. but to have similar feature we need to keep on adding filter on our local email clients. To have server side filter with global tagging is now possible with spamassassin with dovecot sieve as filter on server side. I have created the custom plugin https://github.com/deependhulla/promotionsmailtagging Which I would like to post on https://wiki.apache.org/spamassassin/CustomPlugins for others to use. (did not find where to submit , so on bug/mailling list) Also this code & is suggested for default spamassassin plugin. do let me know how to help. Deepen Dhulla.
Hi Dhulla, Unfortunately, before I can really look at the technical portion of this ticket, we have licensing issues. You have licensed it under GPL for an Apache project. Also, we should have an ICLA on file for you to consider the code. So 1st, change the license to ASF for consideration and 2nd, fill out an ICLA https://www.apache.org/licenses/icla.pdf Beyond that, if you just want to post on the wiki and not change the license, send a blurb and I will add it. We certainly promote OSS and your willingness to share code. Best, KAM
Thanks Deepen for your contribution, much appreciated. I've had a look at your SA plugin, so here's some quick first comments: While your documentation is perfectly fine advising to add the configuration to the SA local.cf file, it generally makes sense to keep custom plugin configuration in its own file. That is, just rename add_to_local.cf for example promotional.cf and keep that file in the same directory as local.cf. Also, loadplugin directives should better be placed in .pre files, which are guaranteed to be processed before any .cf files. (Since you keep all your custom plugin configuration after the loadplugin line, this also works in cf files.) The most important advice is this: Your check_for_promotions() eval rule is called for each message, and should never read custom files for configuration. Any per-plugin configuration should be read once only at initialization. Also it is better to use custom SA configuration instead of some ini file. Looking at your ini file it appears instead of the custom plugin, you could have accomplished the task using a couple non-scoring double underscore sub-rules and a meta rule combining them. The sieve script then should check the X-Spam-Status header for that meta rule's name to identify matching mail. Regarding editing the wiki: You can do that, but first need to send a brief request to the dev@ list so we can grant edit permissions (see the wiki's frontpage). We've had to restrict self-signup to prevent wiki spam and vandalism, unfortunately. For now though, my advise would be to first polish up the custom plugin before posting / linking it from the SA wiki.
Code on GH is licensed GPLv3 and no response from Author to either comment