[Dovecot] Moving email between folders outside of IMAP context

Phil Howard ttiphil at gmail.com
Tue Dec 21 23:33:55 EET 2010

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)?

sHiFt HaPpEnS!

More information about the dovecot mailing list