procmail
[Top] [All Lists]

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

1997-06-05 14:05:00
It looks good up til:

# ____________________________________Bounce anything large
:0
* >10000

{

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

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"  :-)

: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 ??

      # 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   ?