SPAMD.CONF(5)
π SPAMD.CONF(5) π
File Formats Manual, but make it group chat. okay bestie, we're doing the SPAMD.CONF(5) page and it's literally gonna eat. β¨
π NAME π
spamd.conf β the spamd-setup configuration file. periodt. π«Ά
πΈ DESCRIPTION πΈ
spamd.conf is read by spamd-setup(8) to configure blacklists for spamd(8). Blacklists are lists of addresses of likely spammers. Mail from these addresses never reaches the actual mail server β instead it's redirected to spamd(8) and tarpitted. π
spamd.conf follows the syntax of configuration databases as documented in cgetent(3). Here's an example, bestie:
all:\
:somelist:override:myblack:
somelist:\
:black:\
:msg="Your address %A is in an anti-spam list\n\
See http://www.example.org/dnsbl/ for details":\
:method=https:\
:file=www.example.org/spamd/somelist.gz
override:\
:white:\
:method=file:\
:file=/etc/mail/override.txt:
myblack:\
:black:\
:msg=/etc/mail/myblackmsg.txt:\
:method=file:\
:file=/etc/mail/myblack.txt:
The default configuration file must include the entry all, which specifies the order in which lists are to be applied. Lists are constructed by name: blacklists are identified by the capability :black:. If a list is instead given the :white: capability, addresses in it will not be blacklisted. The addresses in such a list are removed from the preceding blacklist.
In the above example, if an address was present in all three lists β the blacklists somelist and myblack, plus the exceptions list override β the address would be removed from list somelist by the subsequent override list. However, the address would not be removed from the myblack list. To remove all the addresses in override from myblack, the following configuration would be used instead:
all:\
:somelist:override:myblack:override:
The source of the addresses for lists is specified using the method and file capability entries. π
method specifies the method by which to retrieve a file containing a list of addresses and may be one of http, https, ftp, file, or exec. The http, https, ftp, and file methods will make spamd.conf retrieve the file from the location specified by the file capability. The exec method will make spamd.conf spawn the program with arguments indicated in the file capability for the list, and reads a list of addresses from the output of the program.
The format of the list of addresses is expected to consist of one network block or address per line (optionally followed by a space and text that is ignored). Comment lines beginning with # are ignored. Network blocks may be specified in any of the formats as in the following example:
# CIDR format
192.168.20.0/24
# A start - end range
192.168.21.0 - 192.168.21.255
# As a single IP address
192.168.23.1
Each blacklist must include a message, specified in the msg capability as a string. If the msg string is enclosed in double quotes, the characters in the quoted string are escaped as specified in cgetent(3) with the exception that a colon (:) is allowed in the quoted string. The resulting string is used as the message. Alternatively, if the msg string is not specified in quotes, it is assumed to be a local filename from which the message text may be read. π
The message is configured in spamd(8) to be displayed in the SMTP dialogue to any connections that match addresses in the blacklist. The sequence \" in the message will produce a double quote in the output. The sequence %% will produce a single % in the output, and the sequence %A will be expanded in the message by spamd(8) to display the connecting IP address in the output. π
π FILES π
/etc/mail/spamd.confβ configuration file forspamd-setup(8). π
π¦ SEE ALSO π¦
spamd(8), spamd-setup(8)
okay that's the whole page bestie π this iconic little number came from Debian, dated November 12, 2025, and it's literally SPAMD.CONF(5) β no cap, periodt. πβ¨π
π¦ where this page comes from
- nixpkgs unstable: cvs-export
- Copyright (c) 2003 Jason L. Wright (jason@thought.net)
- Copyright (c) 2003 Bob Beck
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms