[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The modify
command alters headers or body of the message.
For each header whose name matches key, replaces its name with new-key. If key is a regular expressions, new-key can contain back references. For example, the following statement selects all headers whose names start with ‘X-’ and changes their names to begin with ‘X-Old-’:
modify header :re ["X-\(.*\)"] ["X-Old-\1"]
For each header whose name matches key, changes its value to value. For example:
modify [Subject] "New subject"
Every occurrence of unescaped ‘&’ in the new value will be replaced by the old header value. To enter the ‘&’ character itself, escape it with two backslash characters (‘\\’). For example, the following statement
modify [Subject] "[Anubis \\& others] &"
prepends the Subject
header with the string ‘[Anubis &
others]’. Thus, the header line
Subject: Test subject
after having been processed by Anubis, will contain:
Subject: [Anubis & others] Test subject
Combines the previous two cases, i.e. changes both the header name and its value, as shown in the following example:
modify header [X-Mailer] [X-X-Mailer] "GNU Anubis"
Removes all occurrences of key from the message body. For example, this statement will remove every occurrence of the word ‘old’:
modify body ["old"]
Replaces all occurrences of key with string. For example:
modify body :extended ["the old \([[:alnum:]]+\)"] "the new \1"
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on January 6, 2024 using texi2html 5.0.