SPAMD(1) User Contributed Perl Documentation SPAMD(1)
NAME
spamd - daemonized version of spamassassin
SYNOPSIS
spamd [options]
Options:
-a, --auto-whitelist, --whitelist Use auto-whitelists
-c, --create-prefs Create user preferences files
-C path, --configpath=path Path for default config files
-d, --daemonize Daemonize
-h, --help Print usage message.
-i ipaddr, --listen-ip=ipaddr,... Listen on the IP ipaddr (default: 127.0.0.1)
-m num, --max-children num Allow maximum num children
-p port, --port Listen on specified port (default: 783)
-q, --sql-config Enable SQL config (only useful with -x)
-V, --virtual-config=dir Enable Virtual configs (needs -x)
-r pidfile, --pidfile Write the process id to pidfile
-s facility, --syslog=facility Specify the syslog facility (default: mail)
--syslog-socket=type How to connect to syslogd (default: unix)
-u username, --username=username Run as username
-v, --vpopmail Enable vpopmail config
-x, --nouser-config Disable user config files
-A host,..., --allowed-ips=..,.. Limit ip addresses which can connect
-D, --debug Print debugging messages
-L, --local Use local tests only (no DNS)
-P, --paranoid Die upon user errors
-H dir Specify a different HOME directory, path optional
DESCRIPTION
The purpose of this program is to provide a daemonized version of the spamassassin executable. The goal is improving throughput perfor-
mance for automated mail checking.
This is intended to be used alongside "spamc", a fast, low-overhead C client program.
See the README file in the "spamd" directory of the SpamAssassin distribution for more details.
Note: Although spamd will check per-user config files for every message, any changes to the system-wide config files will require restart-
ing spamd for the changes to take effect.
OPTIONS
Options of the long form can be shortened as long as they remain unambiguous. (i.e. --dae can be used instead of --daemonize) Also, bool-
ean options (like --auto-whitelist) can be negated by adding --no (--noauto-whitelist), however, this is usually unnecessary.
-a, --auto-whitelist, --whitelist
Use auto-whitelists. Auto-whitelists track the long-term average score for each sender and then shift the score of new messages toward
that long-term average. This can increase or decrease the score for messages, depending on the long-term behavior of the particular
correspondent. See the README file for more details.
-c, --create-prefs
Create user preferences files if they don't exist (default: don't).
-C path, --configpath=path
Use the specified path for locating configuration files. Ignore the default directories.
-d, --daemonize
Detach from starting process and run in background (daemonize).
-h, --help
Print a brief help message, then exit without further action.
-i ipaddress, --listen-ip=ipaddress, --ip-address=ipaddress
Tells spamd to listen on the specified IP address [defaults to 127.0.0.1]. Use 0.0.0.0 to listen on all interfaces.
-p port, --port=port
Optionally specifies the port number for the server to listen on.
-q, --sql-config
Turn on SQL lookups even when per-user config files have been disabled with -x. this is useful for spamd hosts which don't have user's
home directories but do want to load user preferences from an SQL database.
-V, --virtual-config=directory
This option specifies a directory which will contain per-user preference files. The files are in the format of username.prefs. A
default.prefs file will be used if an individual user config is not found.
Note that this requires that -x is used, and cannot be combined with SQL-based configuration.
-r pidfile, --pidfile=pidfile
Write the process ID of the spamd parent to the file specified by pidfile. The file will be unlinked when the parent exits. Note that
when running with the -u option, the file must be writable by that user.
-v, --vpopmail
Enable vpopmail config (only useful with -u set to vpopmail user). This option is useful for vpopmail virtual users who do not have an
entry in the system /etc/passwd file. This allows spamd to lookup/create user_prefs in the vpopmail users own maildir.
-s facility, --syslog=facility
Specify the syslog facility to use (default: mail). If "stderr" is specified, output will be written to stderr. This is useful if
you're running "spamd" under the "daemontools" package.
--syslog-socket=type
Specify how spamd should send messages to syslogd. The options are "unix", "inet" or "none". The default is to try "unix" first,
falling back to "inet" if perl detects errors in its "unix" support.
Some platforms, or versions of perl, are shipped with dysfunctional versions of the Sys::Syslog package which do not support some
socket types, so you may need to set this. If you get error messages regarding __PATH_LOG or similar from spamd, try changing this
setting.
-u username, --username=username
Run as the named user. The alternative, default behaviour is to setuid() to the user running "spamc", if "spamd" is running as root.
-x, --nouser-config, --user-config
Turn off(on) per-user config files. All users will just get the default configuration.
-A host,..., --allowed-ips=host,...
Specify a list of authorized hosts or networks which can connect to this spamd instance. Single IP addresses can be given, or ranges of
ip addresses in address/masklength format. This option can be specified multiple times or can take a list of addresses separated by
commas. Examples:
-A 10.11.12.13,10.11.12.14 -- only allow connections from 10.11.12.13 and 10.11.12.14
-A 10.200.300.0/24 -- allow connections from any machine in the range 10.200.300.*
By default, connections are only accepted from localhost [127.0.0.1].
-D, --debug
Print debugging messages
-L, --local
Perform only local tests on all mail. In other words, skip DNS and other network tests. Works the same as the "-L" flag to spamassas-
sin(1).
-P, --paranoid
Die on user errors (for the user passed from spamc) instead of falling back to user nobody and using the default configuration.
-m number, --max-children=number
This option is not recommended -- see below.
Specify a maximum number of children to spawn. Spamd will wait until another child finishes before forking again. Meanwhile, incoming
connections will be queued.
Use of this option is not recommended in most circumstances, as we have received reports of the perl interpreter dumping core. It
seems that some versions of Perl on some OSes have issues with tracking child processes and signal handling, which the perl interpreter
to crash.
Please note that there is a OS specific maximum of connections that can be queued (Try "perl -MSocket -e'print SOMAXCONN'" to find this
maximum).
-H directory, --helper-home-dir=directory
Specify that external programs such as Razor, DCC, and Pyzor should have a HOME environment variable set to a specific directory. The
default is to use the HOME environment variable setting from the shell running spamd. By specifying no argument, spamd will use the
spamc caller's home directory instead.
BUGS
Perl 5.005_03 seems to have a bug which spamd triggers, causing messages to pass through unscanned. Upgrading to Perl 5.6 seems to fix the
problem, so that's the current workaround. More information can be found at http://www.hughes-family.org/bugzilla/show_bug.cgi?id=497
The "-m" switch seems to trigger signal-handling bugs in many versions of Perl.
SEE ALSO
spamc(1) spamassassin(1) Mail::SpamAssassin(3) Mail::SpamAssassin::Conf(3)
AUTHOR
Craig R Hughes <craig@hughes-family.org>
PREREQUISITES
"Mail::SpamAssassin"
perl v5.8.0 2003-02-25 SPAMD(1)