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