Adding a Header
Adding a new header to all messages can be useful for tracking purposes. This filter adds an "X-Seen-By" header to all messages.
# attr NAME=add a header # Adds an 'X-Seen-By' header to all messages. pmx_add_header "X-Seen-By" "%%HOSTNAME%%";
pmx_add_headeraction adds an "X-Seen-By" header to the message. The value of the header is the hostname of the PureMessage machine (for example
%%HOSTNAME%%template variable is called. For a list of supported template variables, see the pmx-policy manpage.
Where does this filter go?
The "add a header" filter should be placed before the filter in "Policy Script 1: Scan
and Deliver Internal Messages" and directly after the
Positioning the "add a header" filter at this point ensures that:
- The "add a header" filter always executes. (A
stopcommand from another filter will not prevent it from executing.)
- Subsequent spam and virus filters will always execute. (The "add a header" filter does
not contain a
stopcommand that would otherwise end the policy script before spam and virus filters execute.)