[Dovecot] Request for help with new plugin

John Lightsey jd at cpanel.net
Thu Oct 9 18:26:42 EEST 2008


Hi there,

I was having lots of trouble with the normal expire plugin so I  
decided to try and come up with a plugin that handles the trash  
directory in the same way as Courier (when the user logs out it should  
clean messages from the trash that have been there for more than X  
days.)  I used the expire and trash plugins as a guide but there are  
probably a number of things done wrong here and I have plenty of  
questions.

To use this you'd need to run autoreconf for the autotools scripts,  
compile, make, make install, then add "autoexpire" to the imap/pop3  
mail_plugins lists and "autoexpire = Trash 7" to the plugin section.


1. Is there any documentation of how the hook system and virtual  
mailboxes work outside of the source code?

2. I'd like the Trash cleanup to occur at logout, but the closest I  
could find was mailbox close.  This makes the behavior a little  
quirky.  It seems like Dovecot closes the mailbox each time it  
performs an operation on it, so when the client gets a list of mail in  
the box it does a close and the oldest items in the returned list will  
actually be expunged.

3. Is SAVE_DATE the correct field to be looking for here?  I want the  
expiration to be based on the amount of time the letter has spent in  
the trash folder.

4. For searching through the Trash folder, SEARCH_BEFORE doesn't seem  
to match up with SAVE_DATE.  Is there some other way to limit the  
search results to the dates that will fall before a certain SAVE_DATE  
value?

J.D.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dovecot-autoexpire-plugin.diff
Type: application/octet-stream
Size: 9945 bytes
Desc: not available
Url : http://dovecot.org/pipermail/dovecot/attachments/20081009/05a26a2b/attachment.obj 
-------------- next part --------------



More information about the dovecot mailing list