[Dovecot] first crack at auto-trash plugin
I have written an alpha version of an auto trash plugin for dovecot. When compiled in any mail expunged from a non-Trash folder is moved to a folder named Trash. As of yet the folder is not created if it doesn't exist (the process fails before expunge). I would appreciate feedback of any sort. In addition, I am currently getting an error I haven't been able to puzzle out in the logs when it runs:
Mar 21 15:22:01 david dovecot: imap(david@grayskies.net): Timeout leak: 0x807fad0
I see that it seems to relate to transactions somehow, but my few hours of playing with dovecot haven't given me the answer - so ideas/patches to the code would also be nice.
You can grab it here: http://wrath.grayskies.net/tarballs/auto-trash.tar.gz
-David
I have Dovecot configured to accept only SSL connections right now, but I would like to accept plain IMAP if the connection originates in 127.0.0.1/32 (and still require IMAPS for remote users).
What do I need to define in dovecot.conf to make this work?
Thanks, Hugh
h@hpjt.net wrote:
I have Dovecot configured to accept only SSL connections right now, but I would like to accept plain IMAP if the connection originates in 127.0.0.1/32 (and still require IMAPS for remote users).
What do I need to define in dovecot.conf to make this work?
Thanks, Hugh
The easy way if you're behind a firewall is to not open the non-SSL port.
Are you behind a firewall? :)
I don't know the other way because I've got the firewall.
h@hpjt.net wrote:
I have Dovecot configured to accept only SSL connections right now, but I would like to accept plain IMAP if the connection originates in 127.0.0.1/32 (and still require IMAPS for remote users).
What do I need to define in dovecot.conf to make this work?
This came up recently - I believe you need to put ssl_listen into the protocol section. A quick search the archives suggests:
protocol imap { listen = 127.0.01:143 ssl_listen = *:10993 }
So, IMAP is only listened for on the local address, whereas IMAPS is listened for on any address, on the non-standard port 10993.
Does this help?
-- Curtis Maloney cmaloney@cardgate.net
Just letting you know, that this plugin is of interest to me. I haven't had a chance to try it, but I will be watching it to see how it progresses.
Tim
On 22/03/06, David Powers <david@grayskies.net> wrote:
I have written an alpha version of an auto trash plugin for dovecot. When compiled in any mail expunged from a non-Trash folder is moved to a folder named Trash. As of yet the folder is not created if it doesn't
Linux Counter user #273956
On Tue, 2006-03-21 at 15:47 -0500, David Powers wrote:
I have written an alpha version of an auto trash plugin for dovecot. When compiled in any mail expunged from a non-Trash folder is moved to a folder named Trash. As of yet the folder is not created if it doesn't exist (the process fails before expunge). I would appreciate feedback of any sort. In addition, I am currently getting an error I haven't been able to puzzle out in the logs when it runs:
Mar 21 15:22:01 david dovecot: imap(david@grayskies.net): Timeout leak: 0x807fad0
Probably because you're not calling mailbox_close() for the mailbox you opened.
I see that it seems to relate to transactions somehow, but my few hours of playing with dovecot haven't given me the answer - so ideas/patches to the code would also be nice.
One problem is that it doesn't support "UID EXPUNGE" command where the command allows giving an UID range of the messages to expunge. Although Dovecot doesn't yet announce the UIDPLUS capability for this command, because it's only partially implemented, so at least currently it isn't a problem.
Maybe a bit cleaner way would be to hook into the actual expunge handler and do the copying there before calling the real expunge handler. I think that should work anyway :) plugins/acl/acl-mailbox.c shows an example how to do this.
participants (6)
-
Curtis Maloney
-
David Powers
-
h@hpjt.net
-
Leeman Strout
-
Timo Sirainen
-
Timothy White