procmail
[Top] [All Lists]

Re: Rerun procmail filters on maildir folder.

2002-07-24 10:33:17
Philip corrected a mistake in my reply to Alex:

| Messages written to a maildir folder don't have a leading "From " line,
| so formail won't reliably split the output of 'cat'.  Instead, use a
| for loop in the shell:

Right.  Sorry.  They probably won't necessarily have a trailing blank line
either.  There was a time when formail's -d and -e options would have taken
care of those issues, but now that so many bad MUAs (such as the one that I'm
using here out of inertia) quote headers flush left in responses and most
people lazily leave them in (at least I'm not guilty of that part), those days
are gone.

| sh:
|
| cd path/to/dir/new
| for file in *; do
| procmail < $file
| done

| csh:
|
| cd path/to/dir/new
| foreach file (*)
| procmail < $file
| end

Those have the additional advantages of not invoking cat or formail at all.
I'm just too used to dealing with mboxes.  Thanks for the fixes, Philip.

David





_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail