MIMEHeader - perform regexp tests against MIME headers
loadplugin Mail::SpamAssassin::Plugin::MIMEHeader mimeheader NAME_OF_RULE Content-Id =~ /foo/
This plugin allows regexp rules to be written against MIME headers in the message.
Specify a rule. NAME_OF_RULE is the name of the rule to be used, Header-Name is the name of the MIME header to check, and /pattern/modifiers is the Perl regular expression to match against this.
NAME_OF_RULE
Header-Name
/pattern/modifiers
Note that in a message of multiple parts, each header will be checked against the pattern separately. In other words, if multiple parts have a 'Content-Type' header, each header's value will be tested individually as a separate string.
Header names are considered case-insensitive.
The header values are normally cleaned up a little; for example, whitespace around the newline character in "folded" headers will be replaced with a single space. Append :raw to the header name to retrieve the raw, undecoded value, including pristine whitespace, instead.
:raw
To install Mail::SpamAssassin, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::SpamAssassin
CPAN shell
perl -MCPAN -e shell install Mail::SpamAssassin
For more information on module installation, please visit the detailed CPAN module installation guide.