procmail
[Top] [All Lists]

Re: Two equivalent recipes behave differently

1997-08-26 15:42:19
Klaus Johannes Rusch <KlausRusch(_at_)atmedia(_dot_)net> writes:
This may be a pretty simple mistake, I don't see why the first recipe works pe
rfectly fine:
<elided>
while the second one, having exactly the same formail but just a different pat
tern, fails:

       :0
        * > 16384
        | (formail \
           -rA "Precedence: junk" \
           -I "From: Mail Delivery Subsystem 
<MAILER-DAEMON(_at_)atmedia(_dot_)net>" \
           -I "Subject: Non-delivery notification" \
           -A "X-Loop: mailloop(_at_)atmedia(_dot_)net" ; \
               echo "This is an automated message regarding the non-delivery 
of your message."; \
               echo "Your message contains a binary attachment, which the rec
ipient has chosen "; \
               echo "not to accept, and has consequently been discarded. "; \
               echo " "; \
               echo "postmaster(_at_)atmedia(_dot_)net" \
          ) | $SENDMAIL -oi -t

Recipes that pipe into formail -r need the 'h' flag, as formail will
only read the header.  The earlier recipe 'worked' because you were
(presumably) only feeding it messages whose bodies were less than
PIPEBUF in size.  Feed it a large body and it also would have failed.


Philip Guenther

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