Sieve editheader extension

The MTA has supported the  action  (prior to its standardization) since circa MS 6.1, and the standard   action and proposed   action since MS 6.3. The standard capability string in order to use an  or   action, as defined in RFC 5293 (Sieve Email Filtering: Editheader Extension), or a   action, as defined in draft-degener-sieve-editheader-00, is " ", although note that the MTA does not enforce this for the   action (  may be used without a " " clause): require "editheader"; The MTA has a configurable limit on how many  actions will be permitted in a single Sieve script,. The default is 10. As of the 8.0 release, this limit only applies to user-level Sieves.

When specifying a header label in an  action, note that the header label length is limited to 256 characters, and may not contain any eight bit characters (characters above ASCII position 126) nor  control characters (characters below ASCII position 33) as well as not containing the colon character,.

Note that it may often be useful to make use of the Sieve  extension along with , and perhaps especially in conjunction with the " " action. This is illustrated in the following example in which a site&#x27;s broken DMARC usage, which could break mailing lists for innocent other members of the list is ameliorated by forcibly modifying the (broken domain&#x27;s) addresses so as not to trigger bounce messages for messages from this broken domain to other list recipients thereby causing the innocent list members to be removed from mailing lists. require &#x5b;"editheader","variables"&#x5d;; if address :domain :is "From" "dmarcbrokenusage.domain.com" { replaceheader :newvalue "${1}&#x3c;${2}@dmarcbrokenusage.domain.com.invalid&#x3e;&#x3e;${3}" :matches "From" "&#x2a;&#x3c;&#x2a;@dmarcbrokenusage.domain.com&#x3e;&#x2a;"; replaceheader :newvalue "${1}@dmarcbrokenusage.domain.com.invalid" :matches "From" "&#x2a;@dmarcbrokenusage.domain.com"; addprefix text: Due to dmarcbrokenusage.domain.com&#x27;s broken use of DMARC, the From: address in this message has been replaced by &#x3c;original-address&#x3e;.invalid. To reply to the original sender of this message, remove the .invalid from the end of the domain. . }
 * 1) dmarcbrokenusage.domain.com addresses that include phrase and/or comment:
 * 1) Simple dmarcbrokenusage.domain.com addresses:

See also:
 * Sieve addprefix and addsuffix extensions
 * max_addheaders MTA Option
 * defer_header_addition MTA Option
 * Sieve supported extensions
 * Sieve language