procmail
[Top] [All Lists]

Re: The recipe didn't do what they said it would do....

1997-06-05 14:58:00
wwgrol(_at_)sparc01(_dot_)fw(_dot_)hac(_dot_)com (W. Wesley Groleau x4923) 
writes:
Blank lines in recipes weren't ignored until procmail 3.11pre something.
If you don't have at least 3.11pre3, I'd suspect this is the problem.

I got pre7, but I'm going to re-make it as you suggested in your 
other post about screwy locking problems.  Netscape:mailtool::frying pan:fire

So this was with pre7 before?  It should have skipped the blank line,
which would explain the silent log, as there was no error.  In that case
I'm not sure what the problem is.


The effect of this would be that procmail would abort the recipe with some
nasty message in the logfile, then it would ignore the lonely '{'.  The

The log file contained NOTHING except what trap specified, until I turned
on verbose.  I didn't realize that "non-verbose" meant "silent"  :-)

It doesn't.  Errors should *always* appear in the logfile (well, when they
occur!).  Since you previously turned off LOGABSTRACT, procmail really
doesn't have much to say.



:0hfw # with `h' flag, no -k option for formail
* >10000
| formail -r -i "Subject: Mail Delivery Refused - Too Large"

Unless I misunderstood the man pages, this condition would only match
if the HEADER was that big.   ?? Right ??

Nope.  Size checks are done against the entire message size, even if you
have a 'H' or 'B' flag on the recipe.  The only way to change what is
measured is to use the "var ??" condition special, ala:

        # Is the header bigger than 10k bytes in size?
        :0
        * H ?? > 10000
        |blah blah blah



     # 10k isn't that big.  100k may be a more reasonable limit.
     :0
     * >100000
     {
         # Get the incoming header.  Drop the Received: and "From " headers.
         :0 h
         HEADER=|formail -IReceived: -I"From "

         # Generate the return header, then the body.  $HEADER is the
         # old header from above.  Feed the lot into $SENDMAIL
         :0 h
         | (formail -ri"Subject: Mail Delivery Refused: Too Large"; \
            echo "* The message with the following headers was too "; \
            echo "* large to deliver.  blah blah blah blah blah blah" ; \
            echo ""; echo "$HEADER" \
           ) | $SENDMAIL $SENDMAILFLAGS -t
     }

Thanks.  This is easier to understand than the other one anyway.
Only, should the second  :0 h  say  :0 b   ?

Nope.  You don't care about the body at all, so you're just feeding the
header into formail so that it can generate the reply header.

Philip Guenther

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