procmail
[Top] [All Lists]

Re: Digestifying

1997-05-08 13:02:00
Era Eriksson replied to Dave/WebMaster <ddave(_at_)ddave(_dot_)com>:

|  >     # Do nasty things to the original's headers
|  >     :0fh
|  >     | formail -k -XFrom -XTo: -XDate: -XSubject:
| 
| If you only do the headers, there's no sense in using the -k.

Yes, there is!  If you filter the head through formail -X or -x and don't
use -k, you lose the blank line at the neck of the message, and unless there
is an extra blank line at the top of the body, the uppermost lines of the
body get agglutinated to the head and treated as part of the head for future
recipes (with one exception).  -k keeps the blank line at the neck intact.

The one exception is that if the lines moved from body to head are not valid
in the head, AND there is another filter through formail, formail will put
back the lost blank line.  However, if any part of the former body that is
valid as header lines will stay in the head, where it shouldn't be.  If every
line in entire body is non-empty and indented, for example, it will remain in
the head as continuation lines of the last header field.

Sometimes you *want* to move lines from the top of the body into the head.
Then formail -X "" without -k is a good idea.

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