.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "SPAMASSASSIN 1p" .TH SPAMASSASSIN 1p "2018-10-01" "perl v5.24.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" spamassassin \- extensible email filter used to identify spam .SH "DESCRIPTION" .IX Header "DESCRIPTION" SpamAssassin is an intelligent email filter which uses a diverse range of tests to identify unsolicited bulk email, more commonly known as \*(L"spam\*(R". These tests are applied to email headers and content to classify email using advanced statistical methods. In addition, SpamAssassin has a modular architecture that allows other technologies to be quickly wielded against spam and is designed for easy integration into virtually any email system. .SH "SYNOPSIS" .IX Header "SYNOPSIS" For ease of access, the SpamAssassin manual has been split up into several sections. If you're intending to read these straight through for the first time, the suggested order will tend to reduce the number of forward references. .PP Extensive additional documentation for SpamAssassin is available, primarily on the SpamAssassin web site and wiki. .PP You should be able to view SpamAssassin's documentation with your \fIman\fR\|(1) program or \fIperldoc\fR\|(1). .SS "\s-1OVERVIEW\s0" .IX Subsection "OVERVIEW" .Vb 1 \& spamassassin SpamAssassin overview (this section) .Ve .SS "\s-1CONFIGURATION\s0" .IX Subsection "CONFIGURATION" .Vb 1 \& Mail::SpamAssassin::Conf SpamAssassin configuration files .Ve .SS "\s-1USAGE\s0" .IX Subsection "USAGE" .Vb 4 \& spamassassin\-run "spamassassin" front\-end filtering script \& sa\-learn train SpamAssassin\*(Aqs Bayesian classifier \& spamc client for spamd (faster than spamassassin) \& spamd spamassassin server (needed by spamc) .Ve .SS "\s-1DEFAULT PLUGINS\s0" .IX Subsection "DEFAULT PLUGINS" .Vb 10 \& Mail::SpamAssassin::Plugin::AskDNS \& Mail::SpamAssassin::Plugin::AutoLearnThreshold \& Mail::SpamAssassin::Plugin::Bayes \& Mail::SpamAssassin::Plugin::BodyEval \& Mail::SpamAssassin::Plugin::Check \& Mail::SpamAssassin::Plugin::DKIM \& Mail::SpamAssassin::Plugin::DNSEval \& Mail::SpamAssassin::Plugin::FreeMail \& Mail::SpamAssassin::Plugin::HTMLEval \& Mail::SpamAssassin::Plugin::HTTPSMismatch \& Mail::SpamAssassin::Plugin::Hashcash \& Mail::SpamAssassin::Plugin::HeaderEval \& Mail::SpamAssassin::Plugin::ImageInfo \& Mail::SpamAssassin::Plugin::MIMEEval \& Mail::SpamAssassin::Plugin::MIMEHeader \& Mail::SpamAssassin::Plugin::Pyzor \& Mail::SpamAssassin::Plugin::Razor2 \& Mail::SpamAssassin::Plugin::RelayEval \& Mail::SpamAssassin::Plugin::ReplaceTags \& Mail::SpamAssassin::Plugin::SPF \& Mail::SpamAssassin::Plugin::SpamCop \& Mail::SpamAssassin::Plugin::URIDNSBL \& Mail::SpamAssassin::Plugin::URIDetail \& Mail::SpamAssassin::Plugin::URIEval \& Mail::SpamAssassin::Plugin::VBounce \& Mail::SpamAssassin::Plugin::WLBLEval \& Mail::SpamAssassin::Plugin::WhiteListSubject .Ve .SH "WEB SITES" .IX Header "WEB SITES" .Vb 2 \& SpamAssassin web site: http://spamassassin.apache.org/ \& Wiki\-based documentation: http://wiki.apache.org/spamassassin/ .Ve .SH "USER MAILING LIST" .IX Header "USER MAILING LIST" A users mailing list exists where other experienced users are often able to help and provide tips and advice. Subscription instructions are located on the SpamAssassin web site. .SH "CONFIGURATION FILES" .IX Header "CONFIGURATION FILES" The SpamAssassin rule base, text templates, and rule description text are loaded from configuration files. .PP Default configuration data is loaded from the first existing directory in: .IP "/var/lib/spamassassin/3.004002" 4 .IX Item "/var/lib/spamassassin/3.004002" .PD 0 .IP "/usr/share/spamassassin" 4 .IX Item "/usr/share/spamassassin" .IP "/usr/share/spamassassin" 4 .IX Item "/usr/share/spamassassin" .IP "/usr/local/share/spamassassin" 4 .IX Item "/usr/local/share/spamassassin" .IP "/usr/share/spamassassin" 4 .IX Item "/usr/share/spamassassin" .PD .PP Site-specific configuration data is used to override any values which had already been set. This is loaded from the first existing directory in: .IP "/etc/spamassassin" 4 .IX Item "/etc/spamassassin" .PD 0 .IP "/usr/etc/mail/spamassassin" 4 .IX Item "/usr/etc/mail/spamassassin" .IP "/usr/etc/spamassassin" 4 .IX Item "/usr/etc/spamassassin" .IP "/usr/local/etc/spamassassin" 4 .IX Item "/usr/local/etc/spamassassin" .IP "/usr/pkg/etc/spamassassin" 4 .IX Item "/usr/pkg/etc/spamassassin" .IP "/usr/etc/spamassassin" 4 .IX Item "/usr/etc/spamassassin" .IP "/etc/mail/spamassassin" 4 .IX Item "/etc/mail/spamassassin" .IP "/etc/spamassassin" 4 .IX Item "/etc/spamassassin" .PD .PP From those three directories, SpamAssassin will first read files ending in \&\*(L".pre\*(R" in lexical order and then it will read files ending in \*(L".cf\*(R" in lexical order (most files begin with two numbers to make the sorting order obvious). .PP In other words, it will read \fIinit.pre\fR first, then \fI10_default_prefs.cf\fR before \&\fI50_scores.cf\fR and \fI20_body_tests.cf\fR before \fI20_head_tests.cf\fR. Options in later files will override earlier files. .PP Individual user preferences are loaded from the location specified on the \f(CW\*(C`spamassassin\*(C'\fR, \f(CW\*(C`sa\-learn\*(C'\fR, or \f(CW\*(C`spamd\*(C'\fR command line (see respective manual page for details). If the location is not specified, \&\fI~/.spamassassin/user_prefs\fR is used if it exists. SpamAssassin will create that file if it does not already exist, using \&\fIuser_prefs.template\fR as a template. That file will be looked for in: .IP "/etc/spamassassin" 4 .IX Item "/etc/spamassassin" .PD 0 .IP "/usr/etc/mail/spamassassin" 4 .IX Item "/usr/etc/mail/spamassassin" .IP "/usr/share/spamassassin" 4 .IX Item "/usr/share/spamassassin" .IP "/etc/spamassassin" 4 .IX Item "/etc/spamassassin" .IP "/etc/mail/spamassassin" 4 .IX Item "/etc/mail/spamassassin" .IP "/usr/local/share/spamassassin" 4 .IX Item "/usr/local/share/spamassassin" .IP "/usr/share/spamassassin" 4 .IX Item "/usr/share/spamassassin" .PD .SH "TAGGING" .IX Header "TAGGING" The following two sections detail the default tagging and markup that takes place for messages when running \f(CW\*(C`spamassassin\*(C'\fR or \f(CW\*(C`spamc\*(C'\fR with \&\f(CW\*(C`spamd\*(C'\fR in the default configuration. .PP Note: before header modification and addition, all headers beginning with \f(CW\*(C`X\-Spam\-\*(C'\fR are removed to prevent spammer mischief and also to avoid potential problems caused by prior invocations of SpamAssassin. .SS "\s-1TAGGING FOR SPAM MAILS\s0" .IX Subsection "TAGGING FOR SPAM MAILS" By default, all messages with a calculated score of 5.0 or higher are tagged as spam. .PP If an incoming message is tagged as spam, instead of modifying the original message, SpamAssassin will create a new report message and attach the original message as a message/rfc822 \s-1MIME\s0 part (ensuring the original message is completely preserved and easier to recover). .PP The new report message inherits the following headers (if they are present) from the original spam message: .IP "From: header" 4 .IX Item "From: header" .PD 0 .IP "To: header" 4 .IX Item "To: header" .IP "Cc: header" 4 .IX Item "Cc: header" .IP "Subject: header" 4 .IX Item "Subject: header" .IP "Date: header" 4 .IX Item "Date: header" .IP "Message-ID: header" 4 .IX Item "Message-ID: header" .PD .PP The above headers can be modified if the relevant \f(CW\*(C`rewrite_header\*(C'\fR option is given (see \f(CW\*(C`Mail::SpamAssassin::Conf\*(C'\fR for more information). .PP By default these message headers are added to spam: .IP "X\-Spam-Flag: header" 4 .IX Item "X-Spam-Flag: header" Set to \f(CW\*(C`YES\*(C'\fR. .PP The headers that added are fully configurable via the \f(CW\*(C`add_header\*(C'\fR option (see \f(CW\*(C`Mail::SpamAssassin::Conf\*(C'\fR for more information). .IP "spam mail body text" 4 .IX Item "spam mail body text" The SpamAssassin report is added to top of the mail message body, if the message is marked as spam. .SS "\s-1DEFAULT TAGGING FOR ALL MAILS\s0" .IX Subsection "DEFAULT TAGGING FOR ALL MAILS" These headers are added to all messages, both spam and ham (non-spam). .IP "X\-Spam-Checker-Version: header" 4 .IX Item "X-Spam-Checker-Version: header" The version and subversion of SpamAssassin and the host where SpamAssassin was run. .IP "X\-Spam-Level: header" 4 .IX Item "X-Spam-Level: header" A series of \*(L"*\*(R" charactes where each one represents a full score point. .IP "X\-Spam-Status: header" 4 .IX Item "X-Spam-Status: header" A string, \f(CW\*(C`(Yes|No), score=nn required=nn tests=xxx,xxx autolearn=(ham|spam|no|unavailable|failed)\*(C'\fR is set in this header to reflect the filter status. For the first word, \*(L"Yes\*(R" means spam and \&\*(L"No\*(R" means ham (non-spam). .PP The headers that added are fully configurable via the \f(CW\*(C`add_header\*(C'\fR option (see \f(CW\*(C`Mail::SpamAssassin::Conf\*(C'\fR for more information). .SH "INSTALLATION" .IX Header "INSTALLATION" The \fBspamassassin\fR command is part of the \fBMail::SpamAssassin\fR Perl module. Install this as a normal Perl module, using \f(CW\*(C`perl \-MCPAN \-e shell\*(C'\fR, or by hand. .PP Note that it is not possible to use the \f(CW\*(C`PERL5LIB\*(C'\fR environment variable to affect where SpamAssassin finds its perl modules, due to limitations imposed by perl's \*(L"taint\*(R" security checks. .PP For further details on how to install, please read the \f(CW\*(C`INSTALL\*(C'\fR file from the SpamAssassin distribution. .SH "DEVELOPER DOCUMENTATION" .IX Header "DEVELOPER DOCUMENTATION" .Vb 2 \& Mail::SpamAssassin \& Spam detector and markup engine \& \& Mail::SpamAssassin::ArchiveIterator \& find and process messages one at a time \& \& Mail::SpamAssassin::AutoWhitelist \& auto\-whitelist handler for SpamAssassin \& \& Mail::SpamAssassin::Bayes \& determine spammishness using a Bayesian classifier \& \& Mail::SpamAssassin::BayesStore \& Bayesian Storage Module \& \& Mail::SpamAssassin::BayesStore::SQL \& SQL Bayesian Storage Module Implementation \& \& Mail::SpamAssassin::Conf::LDAP \& load SpamAssassin scores from LDAP database \& \& Mail::SpamAssassin::Conf::Parser \& parse SpamAssassin configuration \& \& Mail::SpamAssassin::Conf::SQL \& load SpamAssassin scores from SQL database \& \& Mail::SpamAssassin::Message \& decode, render, and hold an RFC\-2822 message \& \& Mail::SpamAssassin::Message::Metadata \& extract metadata from a message \& \& Mail::SpamAssassin::Message::Node \& decode, render, and make available MIME message parts \& \& Mail::SpamAssassin::PerMsgLearner \& per\-message status (spam or not\-spam) \& \& Mail::SpamAssassin::PerMsgStatus \& per\-message status (spam or not\-spam) \& \& Mail::SpamAssassin::PersistentAddrList \& persistent address list base class \& \& Mail::SpamAssassin::Plugin \& SpamAssassin plugin base class \& \& Mail::SpamAssassin::Plugin::Hashcash \& perform hashcash verification tests \& \& Mail::SpamAssassin::Plugin::RelayCountry \& add message metadata indicating the country code of each relay \& \& Mail::SpamAssassin::Plugin::SPF \& perform SPF verification tests \& \& Mail::SpamAssassin::Plugin::URIDNSBL \& look up URLs against DNS blocklists \& \& Mail::SpamAssassin::SQLBasedAddrList \& SpamAssassin SQL Based Auto Whitelist .Ve .SH "BUGS" .IX Header "BUGS" See .SH "AUTHORS" .IX Header "AUTHORS" The SpamAssassin(tm) Project .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" SpamAssassin is distributed under the Apache License, Version 2.0, as described in the file \f(CW\*(C`LICENSE\*(C'\fR included with the distribution. .PP Copyright (C) 2015 The Apache Software Foundation