procmail
[Top] [All Lists]

Re: Multiple cat's in formail pipe?

1999-09-29 09:30:27
era eriksson <era(_at_)iki(_dot_)fi> writes:
 * I hate autoresponders which zap the original Subject entirely. I
   changed it so it includes the original Subject in parens. This
   will fail if you ever receive mail which doesn't have a Subject:
   header (but this is somewhat unlikely to happen, as such mail
   breaks RFC822 and Sendmails all over the world will probably
   automatically add an empty Subject: header)

The Subject: header field has always been optional according to the rfcs.
Older versions of sendmail added an empty one if it was missing, but
newer ones do so no longer.

You can either move the extraction of the Subject: to it's own recipe,
or do something like this:

        MATCH           # unset match
        :0c
        * ! $ ^X-Loop: $\LOGNAME
        * 1^0 ^Subject:\/.*
        * 1^0
        | ( formail -rt -I "Subject: Autoreply${MATCH:+ (was: $MATCH)}" \
        ...


Philip Guenther