Adding a Disclaimer

Many sites require all outgoing email to have a legal disclaimer attached. PureMessage can centralize this operation at the mail gateway. This snippet contains the following code:

/* Detect outgoing mail */
if pmx_relay :memberof "internal-hosts" {
pmx_add_banner :body :use_html_pre :file "banner.txt";
}

The pmx_relay test returns true if the email originates from an internal host. PureMessage typically treats mail from internal hosts as "outbound" mail. The pmx_add_banner action adds the contents of the file "banner.txt" to the body of the message. For HTML messages, it wraps the file in <PRE> tags, which makes the banner look more like plain text. If the message does not contain any text, the banner is added as an attachment at the end of the message.