procmail
[Top] [All Lists]

Re: stripping the email body part 2

1998-04-06 00:02:40
On Sun, 5 Apr 1998, Terrance wrote:

:0 hc
              * !^Subject:.*fwd
                 ! email(_at_)address(_dot_)com

thats the code i used thanks to Era
what im trying to do is forward the header from my email to a pager.  the
problem is the pagers system wont forward the message without a body
section.  what I want to to is have the headers forwarded and have a dummy
character inserted into the body to fake one.  any suggestions?

        :0 hc
        * !^Subject:.*fwd
        | ( cat ; echo @ ; echo ) \
        | $SENDMAIL $SENDMAILFLAGS email(_at_)address(_dot_)com

The 'h' flag already strips the body. the 'cat' reiterates the head, with
the echos adding a one-charcter line followed by the requisite empty-line
to tell sendmail the msg is done. 

Or if you could also limit what headers go to the pager, thus:

        :0 c
        * !^Subject:.*fwd
        | ( formail -X'From:' -X'To:' -X'Subject:' ; echo ; echo @ ; echo )
        | $SENDMAIL $SENDMAILFLAGS email(_at_)address(_dot_)com

David Hunt

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