Project

General

Profile

Actions

Enhancement #224

closed

Experiment the antispam dovecot plugin

Added by Marc Dequènes almost 13 years ago. Updated about 12 years ago.

Status:
Resolved
Priority:
High
Category:
Service :: Mail
Start date:
2011-05-17
Due date:
% Done:

100%

Estimated time:
Patch Available:
No
Confirmed:
No
Branch:
Entity:
DuckCorp
Security:
No
Help Needed:
No

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.


Related issues 1 (0 open1 closed)

Related to Ducklings Volunteer Activities - Enhancement #226: Alternative antispam learning methodResolvedMarc Dequènes2011-06-21

Actions
Actions #1

Updated by Marc Dequènes almost 13 years ago

  • Status changed from New to Delegated
Actions #2

Updated by Marc Dequènes over 12 years ago

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
Actions #3

Updated by Marc Dequènes over 12 years ago

  • 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.

Actions #4

Updated by Marc Dequènes over 12 years ago

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

Actions #5

Updated by Marc Dequènes over 12 years ago

Better and safer behavior:
  • these mails would be deleted:
    doveadm search -A mailbox Z-Spam savedbefore 1d deleted
    doveadm search -A mailbox Z-Spam savedbefore 7d seen unflagged
    doveadm search -A mailbox Z-Spam savedbefore 30d unseen unflagged
    
  • the remaining flagged mails, seen or not, would stay forever until deleted or unflagged by the user manually; the (hard) limit would be the mailbox quota

To really remove mails (purged, not just marked as deleted): s/search/expunge/

Actions #6

Updated by Marc Dequènes over 12 years ago

srv_autoexpire_junkbox has been created to implement such auto-purge and is now in crontab. The details can be adjusted before reaching production.

Actions #7

Updated by Marc Dequènes over 12 years ago

  • % 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.

Actions #8

Updated by Marc Dequènes over 12 years ago

  • Status changed from Delegated to In Progress
  • Priority changed from Low to High
Actions #9

Updated by Marc Dequènes about 12 years ago

  • % 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
Actions #10

Updated by Marc Dequènes about 12 years ago

  • % 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.

Actions #11

Updated by Marc Dequènes about 12 years ago

  • % 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.

Actions #12

Updated by Marc Dequènes about 12 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100

It's working perfectly.

Actions

Also available in: Atom PDF