I posted a few days ago about 8MB core dumps I'm getting, with the
INCLUDERC recipe that causes the dumps. I've played with it some
more, and this is the current version:
#
# Handle potentially Junk E-Mail from mailmasher.com
#
# Match on any email to or from mailmasher.com
:0 H
* (^Return-Path:|^Received:|^Message-ID:|^Reply-To:|^From:).*[(@
](mailmasher\.com)
{
# log all matches
:0 c
mm_junk.log
# Is the complaint feature turned on?
:0 c
* COMPLAIN ?? on
{
# if so, first make a temporary copy of the email
:0 c
| cat > $MAILDIR/spam.tmp
# then form a reply from just the header, with appropriate substitutions;
concatenate an autoresponse
# message on the end of it; add a copy of the original email, with full
headers; then add a .signature
# and email it back to sender and to a fixed list of Cc: addresses
:0 ch
| ($FORMAIL -rk -i"Subject: HI, MailMasher user! I'll get back to you." \
-i"Errors-To: tbetz(_at_)pobox(_dot_)com" -i"Reply-To:
tbetz(_at_)pobox(_dot_)com" \
-A"X-Loop: tbetz(_at_)panix(_dot_)com" -i"Cc:
tbetz(_at_)pobox(_dot_)com,numnuts(_at_)mailmasher(_dot_)com" -X ""; \
cat $PMDIR/autoresponse.mm $MAILDIR/spam.tmp; \
echo "";\
echo "-- ";\
cat $HOME/.signature \
) | $SENDMAIL -oi -t
}
# Indicate that a match was found -- the value of $FOUND is later
# assigned to $DELIVER
FOUND=on
}
All the other INCLUDERC files are modeled on this one.
Examining verbose procmail logs of tests generating core dumps, I see
procmail forking processes for `:0 c' recipes, which continue to
execute while succeeding recipes are being launched. I can imagine that
enough of these would cause the symptoms I am seeing.
I need to use the `:0 c' construct because one email might contain
triggers for many recipes, and I don't want the first recipe it
triggers to cause procmail to exit -- but I also don't want procmail
to dump 8MB cores every time I run it!
Is there a way I may instruct procmail to complete one recipe before
launching the next one, so they run and release memory sequentially?
Thanks.
--
|We have tried ignorance for/ Tom Betz (914) 375-1510 |
|a very long time, and it's/ Want to sent me email? Read this first: |
|time we tried education. /<http://www.panix.com/~tbetz/mailterms.html>|
|<http://www.pobox.com/~tbetz>\ I mock up my reactive mind twice daily.|