[Dovecot] IMAP and sieve

Stephan Bosch stephan at rename-it.nl
Mon Dec 19 11:45:18 EET 2011

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:


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:




More information about the dovecot mailing list