General-Purpose Mail Package
|Official GNU Software|
editheader extension complies with RFC 5293. It
provides the following actions:
Adds a header field to the existing message header. By default the
header is inserted at the beginning of the header list. If the tag
:last is specified, it is appended at the end.
Deletes occurrences of the header field matching the criteria.
The value-patterns, if specified, determines which occurrences of the header fielde to delete. If not supplied, comparator and match-type are silently ignored.
If ‘:index fieldno’ is specified, only the numbered
occurrence of the named header field will be matched (header numbering
begins at 1), If
:last is specified, the count is backwards; 1
denotes the last named header field, 2 the second to last, and so on.
The counting happens before the value-patterns match, if any.
Thus, e.g. the action
deleteheader :index 1 :contains "Delivered-To" "firstname.lastname@example.org";
would delete the first ‘Delivered-To’ header field if it contains the string ‘email@example.com’.
This document was generated on August 5, 2021 using makeinfo.Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.