SPAMASS-MILTER(1)
πΈ NAME πΈ
okay so bestie, welcome to the spamass-milter manual page π β this is the sendmail milter for passing emails through SpamAssassin. that's the whole vibe. it sits between sendmail and SpamAssassin and does the filtering thing. iconic behavior, honestly. β¨
π SYNOPSIS π
spamass-milter -p socket [-b|-B spamaddress] [-C -rejectcode]
[-d debugflags] [-D host] [-e defaultdomain] [-f]
[-i networks] [-I] [-m] [-M] [-P pidfile] [-r nn]
[-r -rejectmsg] [-u defaultuser] [-x]
[-S -/path/to/sendmail] [-- spamc flags ...]
π¦ DESCRIPTION π¦
so the spamass-milter utility is a sendmail milter β a lil middle-man β that checks and modifies incoming email messages with SpamAssassin. that's the job. no cap. π
the following options are available:
-p socketβ tells it the pathname of a socket to create so it can talk to sendmail. π«Ά important bit: if that socket gets removed, sendmail straight up can't access the milter anymore. and depending on what's in sendmail's.cffile, that can make messages bounce, queue, or just get passed through unmiltered. so like... don't lose the socket. fr fr.-b spamaddressβ redirects tagged spam to the email address you give it. all envelope recipients get removed, and they get inserted into the message asX-Spam-Orig-To:headers instead. sneaky but documented.-B spamaddressβ literally the same as-b, except the original recipients are retained. and listen β only one of-band-Bmay be used. pick a lane bestie. π-C rejectcodeβ mail that gets rejected is rejected by default with a5.7.1code. this option lets you override that. see also, the-R-Soption. π-d debugflagsβ enables logging.debugflagsis a comma-separated list of tokens:funcβ entry and exit of internal functions.miscβ other non-verbose logging.netβ lookups of the ignored netblocks list.pollβ low-level I/O to the childspamcprocess.rcptβ recipient processing.spamcβ high-level I/O to the childspamcprocess.strβ calls to field lookup and string comparison functions.uoriβ calls to theupdate_or_insertfunction.1β (historical) same asfunc,misc.2β (historical) same asfunc,misc,poll.3β (historical) same asfunc,misc,poll,str,uori.
-D hostβ connects to a remotespamdserver on host, instead of using one onlocalhost.
β οΈ bestie this option is deprecated β use -- -d host instead. the glow-up already happened, move on π
-e defaultdomainβ passes the fulluser@domainaddress tospamc. the default is to pass only the username part, on the assumption that all users are local. this flag is useful if you're using an SQL (or other username) backend with spamassassin and you've listed the full address in there. if the recipient name has no domain part (say, the recipient is on the local machine), then defaultdomain gets added. requires the-uflag. β-fβ causesspamass-milterto fork into the background. bye bestie, going ghost π»-i networksβ ignores messages if the originating IP is in the network(s) listed. the message gets passed through without calling SpamAssassin at all. networks is a comma-separated list, and each element can be either:- an IP address (
nnn.nnn.nnn.nnn) - a CIDR network (
nnn.nnn.nnn.nnn/nn) - or a network/netmask pair (
nnn.nnn.nnn.nnn/nnn.nnn.nnn.nnn)
- an IP address (
multiple -i flags will append to the list. for example, if you list all your internal networks, no outgoing emails will be filtered. π
-Iβ ignores messages if the sender has authenticated via SMTP AUTH. trust the homies. π«Ά-mβ disables modification of theSubject:andContent-Type:headers and the message body. this is useful when SpamAssassin is configured withdefang_mime 0andreport_header 1, or when SA is simply used to add headers for postprocessing later. heads up: updating the body through the milter interface can be slow for large messages. π-Mβ like-m, but it also disables creation of any SpamAssassinX-Spam-*headers as well. both tagged and untagged mail gets passed through unchanged. to actually be useful, this option should be used with the-r,-b, or-Bflags. and if-bis used, theX-Spam-Orig-To:headers will still be added. no cap.-P pidfileβ creates the file pidfile, containing the process id of the milter. so you can find it later. π-r nnβ rejects scanned email if it's greater than or equal to nn. if-1, it rejects scanned email if SpamAssassin tags it as spam (useful if you're also using the-uflag and users have changed theirrequired_hitsvalue).
for example, if you usually use procmail to redirect tagged email into a separate folder just in case of false positives, you can use -r 15 and reject flagrant spam outright while still receiving low-scoring messages. π₯
-R rejecttextβ mail that is rejected is rejected with the message"Blocked by SpamAssassin". this option lets the user call with a different message instead. see also, the-Coption.-S /path/to/sendmailβ this option is used in conjunction with the-xoption to specify a path to sendmail if the default compiled-in choice is not satisfactory.-u defaultuserβ passes the username part of the first recipient tospamcwith the-uflag. this is what lets user preferences files get used. if the message is addressed to multiple recipients, the username defaultuser is passed instead.
π and here's the messy part:spamass-milterdoes not know whether an email is incoming or outgoing. so a message fromβ¨user1@localdomain.comβ©toβ¨user2@yahoo.comβ©will makespamass-milterpass-u user2tospamc. it's doing its best okay.
-xβ passes the recipient address throughsendmail -bv, which will perform virtusertable and alias expansion. the resulting username is then passed tospamc. requires the-uflag. thespamass-milterconfiguration process does its best to find sendmail, but it is possible to override this compiled-in setting via the
(yeah. the sentence just... ends there. that's the manpage's fault, not mine π)
-- spamc flags ...β passes all remaining options tospamc. this allows you to connect to a remotespamdwith-dor-p. go off, king. π
π FILES π
/usr/bin/spamcβ client interface to SpamAssassin. π¦
π SEE ALSO π
π AUTHORS π
- Georg C. F. Greve
<greve@gnu.org> - Dan Nelson
<dnelson@allantgroup.com> - Todd Kover
<kovert@omniscient.com>
and that's the whole page bestie!! πβ¨ this one came out of Debian, dated July 25, 2001, and it lives in section SPAMASS_MILTER(8) β so yeah, it's an old one, but she still serves. periodt. π
π
π¦ where this page comes from
- debian bookworm: spamass-milter 0.4.0-2
- debian trixie: spamass-milter 0.4.0-2
- ubuntu jammy: spamass-milter 0.4.0-2
- ubuntu noble: spamass-milter 0.4.0-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms