[Dovecot] Moving email between folders outside of IMAP context

Tom Hendrikx tom at whyscream.net
Tue Dec 21 23:41:04 EET 2010

On 21/12/10 22:33, Phil Howard wrote:
> I'd like to run a script from cron that will scan certain mailboxes
> and move selected mail from one folder (usually INBOX) to another
> folder.  The basic idea is to move previously detected spam based on
> headers prepended to the mail.  Since I am not able to figure out how
> to get Postfix to invoke deliver with the -m option in these cases,
> and not in others, this is one idea I have come up with to deal with
> it.  The big (hopefully obvious) complication seems to be getting the
> indexes updated.  Is there a way to move mail this way AND then have
> the indexes updated to reflect that move (maybe even if regenerating
> the entire index all over again)?

Hi Phil,

Do not use an external script, but add a global sieve script that sorts
messages into some directory, based on your preferred header.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
Url : http://dovecot.org/pipermail/dovecot/attachments/20101221/adf0a937/attachment.bin 

More information about the dovecot mailing list