Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (OpenBSD-5.7)
Apropos / Subsearch:
optional field

SPAMD.CONF(5)               BSD File Formats Manual              SPAMD.CONF(5)

     spamd.conf -- spamd configuration file


     The spamd.conf file 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, but is instead
     redirected to spamd(8) and tarpitted.

     spamd.conf follows the syntax of configuration databases as documented in
     getcap(3).  Here is an example:


                   :msg="SPAM. Your address %A is in the spews\
                   level 1 database\nsee http://www.spews.org/ask.cgi?x=%A\n":\



     The default configuration file must include the entry all, which speci-
     fies 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

     In the above example, if an address was present in all three lists,
     blacklists spews1 and myblack, as well as the exceptions list override,
     the address would be removed from list spews1 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 con-
     figuration would be used instead:


     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, ftp, file, or exec.  The http, 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
           # A start - end range
           # As a single IP address

     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 getcap(3) with the
     exception that a colon (:) is allowed in the quoted string.  The result-
     ing 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 dia-
     logue 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.

     ftp(1), spamd(8), spamd-setup(8)

BSD                             March 23, 2017                             BSD