procmail
[Top] [All Lists]

RE: adding a missing Date: header

2008-10-03 19:40:36
Todd A. Jacobs wrote Saturday, October 04, 2008 1:27 AM:

There is no need to lock a filter. Also, you're only sending
the header to the pipe, so I believe you're going to lose the
body of the message.
The incantation should be:

    :0 fw
    | formail -a "Date: ${DATE_}" -a "X-Date: added date header"

Nope, he won't lose the body.  Try it.  The filter action only
applies to the head.  The body is untouched.

One improvement, though, is that the second -a invocation
(for "X-Date:" should be an -i.  There could already be an
X-Date: even if there is no Date:.  In that case, the new
X-Date: won't be appended if he only uses the -a flag.

    :0 fw h
     | formail -a "Date: $DATE_" -i "X-Date: added date header"

Dallman

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail