I am currently setting up an IMAP server for archiving purposes. The goal is to drag an email to the IMAP folder, and then have a server-side sieve script to put it in the right folder.
One of the sources used was this wiki entry http://wiki.dovecot.org/LDA/Sieve/Dovecot
I added the mail_plugins = sieve to /etc/dovecot/15-lda.conf
and after some exim4 fiddling, mails delivered are filtered by my sieve script.
Doing the same for imap delivery (in /etc/dovecot/20-imap.conf) give the following error Dec 19 10:22:09 leon dovecot: imap: Error: dlopen(/usr/lib/dovecot/modules/lib90_sieve_plugin.so) failed: /usr/lib/dovecot/libdovecot-sieve.so.0: undefined symbol: mail_deliver_save_open Dec 19 10:22:09 leon dovecot: imap: Error: Can't load plugin sieve_plugin: Plugin is intended to be used only by binaries: lda lmtp (we're imap) Dec 19 10:22:09 leon dovecot: imap: Fatal: Couldn't load required plugins Dec 19 10:22:10 leon dovecot: imap: Error: dlopen(/usr/lib/dovecot/modules/lib90_sieve_plugin.so) failed: /usr/lib/dovecot/libdovecot-sieve.so.0: undefined symbol: mail_deliver_save_open Dec 19 10:22:10 leon dovecot: imap: Error: Can't load plugin sieve_plugin: Plugin is intended to be used only by binaries: lda lmtp (we're imap) Dec 19 10:22:10 leon dovecot: imap: Fatal: Couldn't load required plugins
I notice this part: "plugin is intended to be used only by binaries: lda lmtp (we're imap)"
So the question is if it is possible to run sieve server-side sieve scripts on emails copied using IMAP.
Suggestions are most welcome.
Moozer
-- I am running debian testing # dovecot --version 2.0.15
On 12/19/2011 10:27 AM, moozer wrote:
I am currently setting up an IMAP server for archiving purposes. The goal is to drag an email to the IMAP folder, and then have a server-side sieve script to put it in the right folder. [...] I notice this part: "plugin is intended to be used only by binaries: lda lmtp (we're imap)"
So the question is if it is possible to run sieve server-side sieve scripts on emails copied using IMAP.
Not directly. There is some standardization effort done to achieve something like that:
http://tools.ietf.org/html/draft-ietf-sieve-imap-sieve-02
But this is not implemented so far.
Suggestions are most welcome.
What you can do is run the Sieve filter in some (in)cron job (or by means of some other trigger). For Dovecot v2.1 there is now a special sieve-filter command line tool to perform the filtering on a folder. However, it is not released yet.
For older Dovecot versions you can use this recipe to re-filter mail:
http://wiki2.dovecot.org/HowTo/RefilterMail
Regards,
Stephan.
On 2011-12-19 10:45, Stephan Bosch wrote:
On 12/19/2011 10:27 AM, moozer wrote:
I am currently setting up an IMAP server for archiving purposes. The goal is to drag an email to the IMAP folder, and then have a server-side sieve script to put it in the right folder. [...] I notice this part: "plugin is intended to be used only by binaries: lda lmtp (we're imap)"
So the question is if it is possible to run sieve server-side sieve scripts on emails copied using IMAP.
Not directly. There is some standardization effort done to achieve something like that:
http://tools.ietf.org/html/draft-ietf-sieve-imap-sieve-02
But this is not implemented so far.
This is the exact thing I was looking for. Too bad that I am ahead of my time :-)
Suggestions are most welcome.
What you can do is run the Sieve filter in some (in)cron job (or by means of some other trigger). For Dovecot v2.1 there is now a special sieve-filter command line tool to perform the filtering on a folder. However, it is not released yet.
For older Dovecot versions you can use this recipe to re-filter mail:
At first glance it looks like using dovecot as a generic IMAP server, fetch mail, run filters and ask the IMAP server to move the mail. It could work also.
Regards,
Stephan.
Thank you for a good answer. I will reevaluate my plan based on this.
moozer
participants (2)
-
moozer
-
Stephan Bosch