User Tools

Site Tools


reference:spamrules_statement_addheader

This is an old revision of the document!


Spam Filter Rules: AddHeader

Statement AddHeader
Version 2.1.7+
Purpose Allows you to add, replace or remove the specified header line in the message headers

The AddHeader statement requires the full header line in one continuous string, in the format

AddHeader "<full header line>"
  • If the header line is present:
    • It will be replaced if an alternative value is specified.
    • It will be removed if no value is specified.
  • If the specified header is not already present, it will be inserted at the end of the headers.
  • AddHeader should not be used where the header name may appear more than once (e.g. “Received: …”).

Examples

Changing the subject header

AddHeader "subject: VPOP3SPAM ${Subject}"

Removing a header line, by not setting a value

AddHeader "X-MyHeader:"

Changing the value of a header, or inserting it if it does not already exist

AddHeader "X-MyHeader: The new value of the header named X-MyHeader"
reference/spamrules_statement_addheader.1320330134.txt.gz · Last modified: 2018/11/14 10:44 (external edit)