This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
reference:spamrules_statement_addheader [2011/08/23 13:47] – created simon | reference:spamrules_statement_addheader [2018/11/14 10:45] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 2: | Line 2: | ||
^Statement | ^Statement | ||
^Version | ^Version | ||
- | ^Purpose | + | ^Purpose |
- | The **AddHeader** statement requires the full text of the header in one continuous string, in the format | + | The **AddHeader** statement requires the full header |
- | AddHeader "< | + | AddHeader "<full header |
- | =====Example===== | + | * If the header line is present: |
- | Changing the subject | + | * 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. " | ||
+ | |||
+ | From VPOP3 v6.20 onwards, the header modifier format has been extended: | ||
+ | * If you prefix it with -, it will be added at the the start of the final headers | ||
+ | * If you prefix it with +, it will be added at the end of the final headers | ||
+ | * If you prefix it (after the -/+ above) with " | ||
+ | * If you prefix it with #, it will remove the header if the data matches the regular expression specified in the modifier' | ||
+ | * | ||
+ | |||
+ | =====Examples===== | ||
+ | Changing the subject | ||
< | < | ||
AddHeader " | AddHeader " | ||
+ | </ | ||
+ | |||
+ | Removing a header line, by not setting a value | ||
+ | < | ||
+ | AddHeader " | ||
+ | </ | ||
+ | |||
+ | Changing the value of a header, or inserting it if it does not already exist | ||
+ | < | ||
+ | AddHeader " | ||
</ | </ |