[Dovecot] Imap Folder activity detect

Antonio Perez-Aranda aperezaranda at yaco.es
Wed Oct 6 14:26:18 EEST 2010


Hi all,

We are migrating a mail service with 80.000 users, and 40.000 of them are
using IMAP.

At present, this service is handled by Courier, with some custom patches.
And we are migrating to Dovecot 1.2.15.

One of these patches is used to interact with Spamassassin. If Courier
detects any move/copy operation to the "IsSPAM" or "IsntSPAM" folders, a
specific bash script is executed like IsSPAM.sh and IsntSPAM.sh

These scripts do the following:

IsSPAM.sh
 1. Takes user as parameter USER.
 2. Retrieves the homeDirectory of USER from ldap, using ldapsearch.
 3. Executes /usr/bin/sa-learn --spam ... with IsSPAM folder

IsntSPAM.sh
 1. Takes user as parameter USER.
 2. Retrieves the homeDirectory of USER from ldap, using ldapsearch.
 3. Executes /usr/bin/sa-learn --ham ... with IsntSPAM folder
 4. Moves all content from IsntSPAM to INBOX


I think that it shouldn't be very hard to implement a plugin to detect
MOVE/COPY events to specified folders, and to execute specified scripts on
detection.

Is there already such a plugin for dovecot 1.2.15?


More information about the dovecot mailing list