procmail
[Top] [All Lists]

Re: possible to procmail all existing fetched mails?

2009-04-07 00:49:17
zhang zhengquan wrote:

2009/4/3 Klaus Johannes Rusch <KlausRusch(_at_)atmedia(_dot_)net>:

You can re-process an existing mailbox using

formail -s procmail < ~/mailbox

just to confirm that this does not work with maildir formats?


For maildir format, cd to the maildir, and (this is in sh syntax; csh syntax will differ):

 for message in cur/* new/* tmp/*
 do [ -f "$message" ] && procmail < $message
 # the -f test is in case a directory is empty
 # and a wildcard remains unsubstituted
 done

Since the asterisks will be globbed before the iteration starts, there won't be any endless loops.
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail