Mailfromd |
|
General-Purpose Mail Filter |
Sergey Poznyakoff |
Mailfromd Manual (split by node): | ? |
There are two ways to modify message headers in a MFL script. First is to use header actions, described in Action Statements, and the second way is to use message modification functions. Compared with the actions, the functions offer a series of advantages. For example, using functions you can construct the name of the header to operate upon (e.g. by concatenating several arguments), something which is impossible when using actions. Moreover, apart from three basic operations (add, modify and remove), as supported by header actions, header functions allow to insert a new header into a particular place.
Adds a header ‘name: value’ to the message. If idx is given, it specifies a 0-based index in the header list where to insert this header.
If idx is not supplied, the header is appended to the end of the header list.
In contrast to the add
action, this function allows to construct
the header name using arbitrary MFL expressions.
This function is equivalent to header_add
with three arguments,
i.e. it inserts a header ‘name: ‘value’’ at
idxth header position in the message.
Delete header name from the envelope. If index is given, delete indexth instance of the header name.
Notice the differences between this function and the delete
action:
delete
requires it to be a literal string.
Replace the value of the header name with value. If index is given, replace indexth instance of header name.
Notice the differences between this function and the replace
action:
replace
requires it to be a literal string.
Mailfromd Manual (split by node): | ? |
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.