ading header with procmail ?
6 answers - 271 bytes -

Hi,
Is it possible to add a header (i.e. "X-found-keyword") to messages that
match some content in the body ?
I know I can check for content found in the body , but I don't know how
to add a header to the message if the keyword is found
Thanks
No.1 | | 237 bytes |
| 
Nov 2, 2005, at 9:25 PM, Flatman wrote:
Is it possible to add a header (i.e. "X-found-keyword") to messages
that
match some content in the body ?
:0 fwh
| formail -I "X-found-keyword: blah"
Aloha mai Nai`a!
No.2 | | 350 bytes |
| 
* Michael J Wise <mjwise (AT) kapu (DOT) netwrote:
|
| Nov 2, 2005, at 9:25 PM, Flatman wrote:
|
| Is it possible to add a header (i.e. "X-found-keyword") to messages
| that
| match some content in the body ?
|
| :0 fwh
| | formail -I "X-found-keyword: blah"
|
| Aloha mai Nai`a!
Thanks , I'll try that
No.3 | | 298 bytes |
| 
* Flatman <flatman (AT) swing (DOT) be[11-03-05 04:05]:
* Michael J Wise <mjwise (AT) kapu (DOT) netwrote:
|
| :0 fwh
| | formail -I "X-found-keyword: blah"
|
Thanks , I'll try that
better look at 'man formail' first. -I is to remove, -A is to add.
No.4 | | 521 bytes |
| 
Nov 3, 2005, at 4:16 AM, Patrick Shanahan wrote:
* Flatman <flatman (AT) swing (DOT) be[11-03-05 04:05]:
>* Michael J Wise <mjwise (AT) kapu (DOT) netwrote:
>|
>| :0 fwh
>| | formail -I "X-found-keyword: blah"|
>>
>Thanks , I'll try that
>
better look at 'man formail' first. -I is to remove, -A is to add.
-I is for Insert.
Methinks you should re-read the section.
Aloha mai Nai`a!
No.5 | | 1111 bytes |
| 
* Michael J Wise <mjwise (AT) kapu (DOT) net[11-03-05 14:26]:
Nov 3, 2005, at 4:16 AM, Patrick Shanahan wrote:
better look at 'man formail' first. -I is to remove, -A is to add.
-I is for Insert.
Methinks you should re-read the section.
exerts from man formail v3.15.1 2001/01/08:
(std on SuSE 9.0)
-a headerfield
Append a custom headerfield onto the header; but only if a
similar field does not exist yet. If you specify either one
of the field names Message-ID: or Resent-Message-ID: with no
field contents, then for* mail will generate a unique
message-ID for you.
-A headerfield
Append a custom headerfield onto the header in any case.
-i headerfield
Same as -A, except that any existing similar fields are
renamed by prepending an `'' prefix. If headerfield
consists only of a field-name, it will not be appended.
-I headerfield
Same as -i, except that any existing similar fields
are simply removed. If headerfield consists only of a
field-name, it effectively deletes the field.
No.6 | | 575 bytes |
| 
Patrick Shanahan:
* Michael J Wise <mjwise (AT) kapu (DOT) net[11-03-05 14:26]:
>Nov 3, 2005, at 4:16 AM, Patrick Shanahan wrote:
better look at 'man formail' first. -I is to remove, -A is to add.
>
>-I is for Insert.
>Methinks you should re-read the section.
exerts from man formail v3.15.1 2001/01/08:
They all add or insert.
The -A can result in duplicates,
the -a will not overwrite so can fail,
the -i any duplicates,
the -I overwrites or adds.