procmail
[Top] [All Lists]

Re: dumping of messages...

1998-01-07 00:44:25
On Mon, 5 Jan 1998, Kwoody wrote:
According to my logs the last cron job to call out got 45 messages but 
procmail suddenly decided to dump them all cause in my procmail log it 
showed none of the 45 messages matched my recipe.

It sounds to me as though procmail got all the messages at once, and may
have recognized the first and then treated the remaining mail as though it
were the body of the first. I've seen this in my setup when piping a file
full of mail to procmail.

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

Adjust the conditions to suit your taste. Perhaps someone else on the list
understands what is happening better than I and has a better solution.

David Hunt



<Prev in Thread] Current Thread [Next in Thread>