David Hunt suggested to Kwoody,
| I have one perverse idea that may handle the problem when it occurs. I say
| perverse, because it calls procmail recursively. Call formail to split the
| mail when headerfields are contained in the body, calling procmail again
| as the output-program of formail.
|
| # If it looks like more than one mail, send to formail for splitting, then
| # send back to procmail for sorting again.
| :0
| * B ?? ^From( )[-_+(_dot_)(_at_)a-z0-9]+( )(Sun|Mon|Tue|Wed|Thu|Fri|Sat)
| * B ?? ^From:
| * B ?? ^TO()
| * ! ^X-Loop: kwoody(_at_)citytel(_dot_)net
| | formail +0 -A"X-Loop: kwoody(_at_)citytel(_dot_)net" -m4s procmail
There's nothing perverse about it; it's a common way of bursting digests
(though for bursting digests one needs the -d option to formail and -m4
would probably be too high a setting) and then having the component articles
processed individually by procmail (often one names a specific rcfile for
them, but David's insertion of X-Loop makes it possible to reuse .procmailrc
for the separate messages). The +0 doesn't do anything, and I would tweak
it a few little ways, but the basic idea is very sound and solid.
:0B
* ^From( )[-_+(_dot_)(_at_)a-z0-9]+( )(Sun|Mon|Tue|Wed|Thu|Fri|Sat)
* ^From:
* ^TO
* ! H ?? ^X-Loop: kwoody(_at_)citytel\(_dot_)net
| formail -A"X-Loop: kwoody(_at_)citytel(_dot_)net" -m4s procmail