procmail
[Top] [All Lists]

Re: Add a home grown header

1999-10-10 12:07:30
At 14:29 -0400 10/10/99, I wrote:
At 10:47 -0700 10/10/99, Harry Putnam wrote:
Probably terribly amateurish:

I want to add a header to mail I receive that is in html format.  Some
times the "Content-Type:" message  isn't in the head of a message but in
the  body.  So to make a simple header that indicates an html formated
message I'm using this home-boy procmail recipe:

:0 HB
* ^Content-Type: text/html
  {
        :0
        | formail -I "X-HTML: HTML message" >> /var/spool/mail/reader
   }

No doubt this will introduce horrible locking problems, but I couldn't
quite figure out how to do this more elegantly, without a redirect but
still have the mail land in $DEFAULT mail box.  I do further
processing from that point with "Gnus".

Use :0 fw instead:

        :0 fw
        | formail -I "X-HTML: HTML message" >> /var/spool/mail/reader
   }


Ah, my bad. Just change it so it reads:

        :0 fw
        | formail -I "X-HTML: HTML message"

You can deliver it to $DEFAULT (if you haven't changed $DEFAULT to be something other than your incoming mail spool), or pass it through your other recipes.

Sorry about that, the clutch in my brain seems to be slipping today...

Scott

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