Enhancement #224
closed
Experiment the antispam dovecot plugin
Added by Marc Dequènes over 13 years ago.
Updated almost 13 years ago.
Description
Once i founce this plugin: http://johannes.sipsolutions.net/Projects/dovecot-antispam
Unfortunately, moving many mails at once would surely drive Orfeo crazy, so i just disregarded this plugin in the past. I just found there is a spool2dir backend, which could be used to create a daemon or incron script to handle delayed retraining in order to avoid creating too much load on the machine. Maybe we could have a look and write some code.
It is now packaged in Debian.
- Status changed from New to Delegated
Z-Spam test folder being used with the mail retrainer script. Using "Junk" of the like would be better for production.
Activated the expire plugin for the Z-Spam plugin, which only does a special indexing. The doveadm script must be used in a crontab to test removing old mails in the test folder. The rule could be Seen=>30d, UnSeen=>90d for example.
As for the files to flow in, to be discussed:
- the default DSPAM mode could become Deliver
- a global SIEVE script (sieve_global_dir) could be provided to redirect such bad mails in
- a default SIEVE script (sieve_global_path) could be installed, including the previous global script
- advanced users may then override the behavior simply by having a custom script (in this case the default script is not run), and include the global script they wish
- Assignee set to Marc Dequènes
- % Done changed from 0 to 50
- Help Needed set to No
The script now follows our requirements. Testing more is needed bu currently satisfactory.
Created and compiled /etc/dovecot/global-sieve/scripts/incoming_spam.sieve with the temporary rules i made for my own account to get SPAM in the Z-Spam test directory. I'm now including it in my own script. Testing in progress.
Fixed dict configuration for the expire plugin. Db files where moved in a separate subdirectory where the doovecot user can write (useful for SQLite).
Commands to look for mails:
doveadm search -A mailbox Z-Spam savedbefore 7d seen
doveadm search -A mailbox Z-Spam savedbefore 30d unseen
doveadm search -A mailbox Z-Spam savedbefore 90d flagged
Doc on the query format: http://wiki2.dovecot.org/Tools/Doveadm/SearchQuery
Better and safer behavior:
To really remove mails (purged, not just marked as deleted): s/search/expunge/
srv_autoexpire_junkbox has been created to implement such auto-purge and is now in crontab. The details can be adjusted before reaching production.
- % Done changed from 50 to 60
Seems to still work well.
The finale folder name will be "Junk".
Migration planned for 2012-02-04/05.
- Status changed from Delegated to In Progress
- Priority changed from Low to High
- % Done changed from 60 to 70
Documentation updated.
Migration in two times:
- Junk activation at 2012-02-04/05
- default delivery mode and filtering rules at 2012-02-11/12
- % Done changed from 70 to 80
The junk folder was activated (replacing Z-Spam). The dovecot configuration was updated, and test folders renamed. the autoexpire script was updated and renamed.
The autoexpire mechanism was also documented.
- % Done changed from 80 to 90
Default retrain and rules activated.
As the default SIEVE behavior has changed concerning delivery into non-existing folders, which are no more auto-created, the Junk folder is now autocreated using a Dovecot plugin (but not auto-subscribed).
Waiting a week for potential problems.
- Status changed from In Progress to Resolved
- % Done changed from 90 to 100
Also available in: Atom
PDF