procmail
[Top] [All Lists]

Re: Out of memory with the latest procmail

2001-09-16 15:04:48
From: Philip Guenther <guenther(_at_)gac(_dot_)edu>

Dallman Ross <admin(_at_)nomotek(_dot_)com> writes:
After my sysadmin installed 3.22 the other day (on my suggestion),
a lot of my mail started requeuing over and over instead of being
delivered as usual.
...
Anyway, I'm hoping Philip or someone else can give me
some ideas as to why I'm suddenly getting out-of-memory
errors with the latest version, and what I might want to
do to try to resolve it.

I don't _know_ of any problems related to getting out-of-memory errors.
So far, the only known problems in 3.22 are a couple around the COMSAT
handling (COMSAT=yes doesn't work, use COMSAT=""), and a bug in the
handling of the 'H' flag that'll drive a quick cycle on 3.23 ('H' flag
is never cleared).

Hmm.  I don't set COMSAT, but I do, very similarly, it seems to me,
set DELIVERED in that very recipe.

DELIVERED = yes 

I've just changed it to

DELIVERED = ""

Let's see if that's the ticket!



I do have verbose logging turned on.  Here's an example from
one that requeues:

[deletia]
procmail: Executing "echo $ACKS/*/"$FROM""
procmail: Out of memory
buffer 0: "echo $ACKS/*/"$FROM""
buffer 1: "echo $ACKS/*/"$FROM""
procmail: Notified comsat: "munged@:**Requeued**"
From dman(_at_)munged(_dot_)com  Sat Sep 15 16:32:16 2001
 Folder: **Requeued**                                                 2793

The recipe that leads to that output is part of my long-used
set that checks for recent mail from sender's address and
sends a not-more-than-weekly auto-reply if it's the first
instance of mail from the sender this week.  It's a rather
complex set of recipes, so I'm not jumping for joy to post
it here now, though I'll be happy to if someone really thinks
doing so would be useful.

Can you show the recipe or variable assignment that generated the
      procmail: Executing "echo $ACKS/*/"$FROM""
log line?  What does the log show as the value of the FROM variable at
that point?

Well, I do log all assignments to FROM, so that part is easy to show.
They all look fine, though, including the ones that requeue.  They are
all plain email addresses.

Recipe:

     
  :0  # Last edited 11-Oct-00
  * ! ^TOlist
  * ! ^FROM_DAEMON
  {
     :0 iw  # asterisk is in SHELLMETAS; i says ignore actual message
     TESTNAME=|echo $ACKS/*/"$FROM"


     :0 # no i - not needed with nested braces
     * $ ! TESTNAME ?? ^^$ACKS/([0-9]+|noacks)/
     {
        # if here, we *will* send an ack!

        :0 whic  # if needed, create today's ackdir; add sender
        * $ ! TESTNAME ?? ^^$ACKS/fullacks/
        | test -d $ACKS/$DATE || mkdir $ACKS/$DATE ;\
           lockfile -r0 $ACKS/$DATE/"$FROM"

        # We use lockfile in a nonstandard way[1], relying on the
         # lagniappe of how it handles exit codes to avoid a possible
          # race condition.  -r0 says don't retry.  (Mainly only
           # another cascaded invocation of procmail would have
            # yielded a failure, anyway.  :-)

              # [1] I.e., we're not using it as a semaphore but to
               # create a durable file.


        ACKTEXT = $ACKS/.acknowledgment
        #DELIVERED = yes            # tell sendmail to go away
        DELIVERED = ""            # tell sendmail to go away
        LOG="  ::: WE'RE ABOUT TO ACK $FROM IN RE. >$SUBJ< $NL"

        :0  # save us from possible SUBJ bombs when calling sed
        * SUBJ ?? [&\/]
        {
           # we're using printf %s to replace echo, which is not
           # consistent in its handling of escape quotes

           SUBJ = `printf %s "$SUBJ" | sed 's,\\\\,\\\\\\\\,g; \
                                            s/&/\\\\&/g;       \
                                            s,/,\\\\/,g'`
        }

        # edited 8-Mar-01: added `w' flag as fail-safe to formail
        :0 wic  # send off the ack!  No X-Loop; we X-Loop all coming in
        | ( formail -r                                                   \
                    -I"From: ${domKEY}bot <${domKEY}bot(_at_)$DOM>"           \
                    -I"Reply-To: Administrator <admin(_at_)$DOM>"             \
                    -I"Sender: ${domKEY}bot <${domKEY}bot(_at_)$DOM>"         \
                    -A"Precedence: junk"                                ;\
            sed "s/\$SUBJ/$SUBJ/;                                        \
                 s/\$DOM/$DOM/" < $ACKTEXT ) | $SENDMAIL $SENDMAILFLAGS -t

     }
  }

-- 
Netcom has imploded.  Please now use NOTnetcom.com for mail.
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Ex-Netcommies:  Mail "forwards" for free forwarding service!
NOT affiliated with EarthLink, Inc.'s Netcom brand identity.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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