procmail
[Top] [All Lists]

Re: Hacking stdin? (Why doesn't this filter do what I expect)

1997-05-08 03:59:00
This seems to produce what I'm looking for at least as far as the order
goes but for dsome reason Pine doesn't recognize it as a multipart/mixed
message. All I see is the bod but it's better than before.

Can somebody tell me exactly when stdin is consumed here?

                :0fh
                | $FORMAIL -rtz \
                        -I "Subject: Re: $SUBJECT [rejected]" \
                        -A "X-Loop: robert(_at_)elastica(_dot_)com" \
                        -I 'Content-Type: multipart/mixed; boundary="-- 
next item --"' ;\

                :0fb
                | echo "This is the preamble of an RFC-1521 encoded, mixed
messa
ge." ;\
                echo "---- next item --" ;\
                echo "Content-Type: text/plain" ;\
                echo "" ;\
                $CAT $MESSAGE | $SED "s/\$SPAMCODE/$SPAM_CODE/g" ;\
                echo "---- next item --" ;\
                echo "Content-Type: message/rfc822" ;\
                echo "" ;\
                $CAT - ;\
                echo "---- next item ----"

                :0
                | $SENDMAIL -oi -t


On Thu, 8 May 1997, era eriksson wrote:

On Thu, 8 May 1997 00:55:03 -0400 (EDT),
Robert Nicholson <steffi2(_at_)dgs(_dot_)dgsys(_dot_)com> wrote:
 >                 | $FORMAIL -rtz \
<...>
 >                         -I 'Content-Type: multipart/mixed; boundary="--
 > next item --"' ;\

BTW, your MIME encoding looks like it would need fixing. Perhaps you
would be better off writing this as a metasend script (not sure if
that program is quite up to it) or whatever. (The only real problem I
saw was that the closing delimiter should be "-- next item ----" but
anyhow, personally, I wouldn't trust myself to do these things by
hand. :-)

 >                 echo "This is the preamble of an RFC-1521 encoded, mixed
 > message." ;\

I believe the RFC is nowadays 2045 or so. 

/* era */

-- 
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r.  <http://www.iki.fi/~era/>
 * Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>