Phil Howard
2010-Dec-21 21:33 UTC
[Dovecot] Moving email between folders outside of IMAP context
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!
Tom Hendrikx
2010-Dec-21 21:41 UTC
[Dovecot] Moving email between folders outside of IMAP context
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. -- Regards, Tom -------------- 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-0002.bin>
Phil Howard
2010-Dec-21 21:58 UTC
[Dovecot] Moving email between folders outside of IMAP context
On Tue, Dec 21, 2010 at 16:41, Tom Hendrikx <tom at whyscream.net> wrote:> Do not use an external script, but add a global sieve script that sorts > messages into some directory, based on your preferred header.How does that get executed. I take it I can't do it via cron. Does it run at deliver time for each mail message? Is it doable in version 1.1.11 (that's what's in my version of Ubuntu)? Do you know which Ubuntu 9.10 package to install (we're stuck on 9.10 until the new server arrives around February). -- sHiFt HaPpEnS!