SPAMASSASSIN(1p)
π spamassassin β the manual, but make it make sense π
okay bestie, so this is the SPAMASSASSIN(1p) page from the User Contributed Perl Documentation, and I'm gonna walk you through it like we're texting at 2am. grab a boba, we're doing this. π§β¨
πΈ NAME πΈ
spamassassin β the extensible email filter that sniffs out spam, no cap π΅οΈβοΈπ
π DESCRIPTION π
SpamAssassin is an intelligent email filter that runs a whole diverse range of tests to identify unsolicited bulk email β aka "spam", the thing we all hate. π€
It applies those tests to email headers and content to classify messages using advanced statistical methods. and likeβ¦ it's modular, bestie. the architecture lets other technologies get yeeted at spam real quick, and the whole thing is designed for easy integration into basically any email system. it's giving versatility. it ate. π₯
β¨ SYNOPSIS β¨
so for ease of access, the SpamAssassin manual got chopped up into several sections. if you're reading these straight through for the first time, the suggested order will tend to reduce the number of forward references. thoughtful, honestly. π«Ά
there's also extensive additional documentation for SpamAssassin available, primarily on the SpamAssassin web site and wiki.
and yes, you should be able to view SpamAssassin's documentation with your man(1) program or perldoc(1). iconic tools. π
π OVERVIEW
spamassassinβ SpamAssassin overview (this section)
π CONFIGURATION
Mail::SpamAssassin::Confβ SpamAssassin configuration files
π USAGE
spamassassin-runβ the "spamassassin" front-end filtering scriptsa-learnβ train SpamAssassin's Bayesian classifierspamcβ client for spamd (faster than spamassassin)spamdβ spamassassin server (needed by spamc)
π DEFAULT PLUGINS
like, the whole starting lineup. respect them. π
Mail::SpamAssassin::Plugin::ARCMail::SpamAssassin::Plugin::AskDNSMail::SpamAssassin::Plugin::AutoLearnThresholdMail::SpamAssassin::Plugin::BayesMail::SpamAssassin::Plugin::BodyEvalMail::SpamAssassin::Plugin::CheckMail::SpamAssassin::Plugin::DKIMMail::SpamAssassin::Plugin::DMARCMail::SpamAssassin::Plugin::DNSEvalMail::SpamAssassin::Plugin::FreeMailMail::SpamAssassin::Plugin::HTMLEvalMail::SpamAssassin::Plugin::HTTPSMismatchMail::SpamAssassin::Plugin::HashBLMail::SpamAssassin::Plugin::HeaderEvalMail::SpamAssassin::Plugin::ImageInfoMail::SpamAssassin::Plugin::MIMEEvalMail::SpamAssassin::Plugin::MIMEHeaderMail::SpamAssassin::Plugin::PyzorMail::SpamAssassin::Plugin::Razor2Mail::SpamAssassin::Plugin::RelayEvalMail::SpamAssassin::Plugin::ReplaceTagsMail::SpamAssassin::Plugin::SPFMail::SpamAssassin::Plugin::SpamCopMail::SpamAssassin::Plugin::URIDNSBLMail::SpamAssassin::Plugin::URIDetailMail::SpamAssassin::Plugin::URIEvalMail::SpamAssassin::Plugin::VBounceMail::SpamAssassin::Plugin::WLBLEvalMail::SpamAssassin::Plugin::WelcomeListSubject
π¦ WEB SITES π¦
- SpamAssassin web site:
https://spamassassin.apache.org/ - Wiki-based documentation:
https://wiki.apache.org/spamassassin/
bookmark them, bestie. iykyk. π
π USER MAILING LIST π
there's a users mailing list, and fr fr it's full of experienced users who are often able to help and provide tips and advice. the subscription instructions live on the SpamAssassin web site. go make friends. π«
π CONFIGURATION FILES π
the SpamAssassin rule base, text templates, and rule description text all get loaded from configuration files. here's the tea:
Default configuration data is loaded from the first existing directory in:
/var/lib/spamassassin/4.000003
/usr/share/spamassassin
/usr/share/spamassassin
/usr/local/share/spamassassin
/usr/share/spamassassin
Site-specific configuration data is used to override any values which had already been set. this one loads from /etc/spamassassin.
from those directories, SpamAssassin will first read files ending in .pre in lexical order, and then it will read files ending in .cf in lexical order (most files begin with two numbers to make the sorting order obvious β cute, right?).
in other words, it reads init.pre first, then 10_default_prefs.cf before 50_scores.cf, and 20_body_tests.cf before 20_head_tests.cf. options in later files will override earlier files. hierarchy. π
Individual user preferences are loaded from the location specified on the spamassassin, sa-learn, or spamd command line (see respective manual page for details β i'm not doing their homework for them). if the location is not specified, ~/.spamassassin/user_prefs is used if it exists. SpamAssassin will create that file if it does not already exist, using user_prefs.template as a template. that template file will be looked for in:
/etc/spamassassin
/usr/etc/mail/spamassassin
/usr/share/spamassassin
/etc/spamassassin
/etc/mail/spamassassin
/usr/local/share/spamassassin
/usr/share/spamassassin
π₯ TAGGING π₯
the next two sections detail the default tagging and markup that takes place for messages when running spamassassin or spamc with spamd in the default configuration.
β οΈ Note: before header modification and addition, all headers beginning with X-Spam- are removed to prevent spammer mischief and also to avoid potential problems caused by prior invocations of SpamAssassin. messy exes stay in the past, bestie. π«
π TAGGING FOR SPAM MAILS π
by default, all messages with a calculated score of 5.0 or higher are tagged as spam.
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 MIME part (ensuring the original message is completely preserved and easier to recover). it's giving responsible. π«Ά
the new report message inherits the following headers (if they are present) from the original spam message:
From: header
To: header
Cc: header
Subject: header
Date: header
Message-ID: header
the above headers can be modified if the relevant rewrite_header option is given (see Mail::SpamAssassin::Conf for more information).
by default these message headers are added to spam:
X-Spam-Flag:header β set to"YES".
the headers that added are fully configurable via the add_header option (see Mail::SpamAssassin::Conf for more information).
- spam mail body text β the SpamAssassin report is added to top of the mail message body, if the message is marked as spam.
π DEFAULT TAGGING FOR ALL MAILS π
these headers get added to all messages, both spam and ham (non-spam). everyone gets a sticker. π
X-Spam-Checker-Version:header β the version and subversion of SpamAssassin and the host where SpamAssassin was run.X-Spam-Level:header β a series of"*"characters where each one represents a full score point.X-Spam-Status:header β a string,"(Yes|No), score=nn required=nn tests=xxx,xxx autolearn=(ham|spam|no|unavailable|failed)"is set in this header to reflect the filter status. for the first word,"Yes"means spam and"No"means ham (non-spam).
the headers that added are fully configurable via the add_header option (see Mail::SpamAssassin::Conf for more information).
π INSTALLATION π
the spamassassin command is part of the Mail::SpamAssassin Perl module. install this as a normal Perl module, using perl -MCPAN -e shell, or by hand. your call, main character. π
β οΈ hmm okay important: it is not possible to use thePERL5LIBenvironment variable to affect where SpamAssassin finds its perl modules, due to limitations imposed by perl'staintsecurity checks. so don't try it, bestie, it's not gonna go how you want. π
for further details on how to install, please read the INSTALL file from the SpamAssassin distribution.
π DEVELOPER DOCUMENTATION π
for the dev girlies (gender neutral) who want to go deep:
Mail::SpamAssassinβ Spam detector and markup engineMail::SpamAssassin::ArchiveIteratorβ find and process messages one at a timeMail::SpamAssassin::AutoWelcomelistβ auto-welcomelist handler for SpamAssassinMail::SpamAssassin::Bayesβ determine spammishness using a Bayesian classifierMail::SpamAssassin::BayesStoreβ Bayesian Storage ModuleMail::SpamAssassin::BayesStore::SQLβ SQL Bayesian Storage Module ImplementationMail::SpamAssassin::Conf::LDAPβ load SpamAssassin scores from LDAP databaseMail::SpamAssassin::Conf::Parserβ parse SpamAssassin configurationMail::SpamAssassin::Conf::SQLβ load SpamAssassin scores from SQL databaseMail::SpamAssassin::Messageβ decode, render, and hold an RFC-2822 messageMail::SpamAssassin::Message::Metadataβ extract metadata from a messageMail::SpamAssassin::Message::Nodeβ decode, render, and make available MIME message partsMail::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 classMail::SpamAssassin::Pluginβ SpamAssassin plugin base classMail::SpamAssassin::Plugin::RelayCountryβ add message metadata indicating the country code of each relayMail::SpamAssassin::Plugin::SPFβ perform SPF verification testsMail::SpamAssassin::Plugin::URIDNSBLβ look up URLs against DNS blocklistsMail::SpamAssassin::SQLBasedAddrListβ SpamAssassin SQL Based Auto Welcomelist
π BUGS π
found one? spill it here: <https://bz.apache.org/SpamAssassin/> β they wanna know, fr fr. π
π«Ά AUTHORS π«Ά
The SpamAssassin(tm) Project <https://spamassassin.apache.org/>
π COPYRIGHT AND LICENSE π
SpamAssassin is distributed under the Apache License, Version 2.0, as described in the file LICENSE included with the distribution.
Copyright (C) 2015 The Apache Software Foundation
and that's the whole page bestie, we did it!! πβ¨ this whole thing came to you via perl v5.40.1, dated 2026-07-23 β so yeah, SPAMASSASSIN(1p), that's the vibe. go filter some spam, you absolute icon. ππ¦πΈ
π¦ where this page comes from
- ubuntu stonking: spamassassin 4.0.2+svn1935691-1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms