Allow learning and forgetting (to a local Bayes database), reporting
and revoking (to a remote database) by spamd. The client issues a TELL
command to tell what type of message is being processed and whether
local (learn/forget) or remote (report/revoke) databases should be
Note that spamd always trusts the username passed in (unless <B>--auth-identB> is used) so clients could maliciously learn messages for other users. (This is not ususally a concern with an SQL Bayes store as users will typically have read-write access directly to the database, and can also use sa-learn with the <B>-uB> option to achieve the same result.)
|<B>-cB>, <B>--create-prefsB>||Create user preferences files if they dont exist (default: dont).|
|<B>-CB> path, <B>--configpathB>=path||Use the specified path for locating the distributed configuration files. Ignore the default directories (usually /usr/share/spamassassin or similar).|
|<B>--siteconfigpathB>=path||Use the specified path for locating site-specific configuration files. Ignore the default directories (usually /etc/mail/spamassassin or similar).|
|<B>--cf=config lineB>||Add additional lines of configuration directly from the command-line, parsed after the configuration files are read. Multiple <B>--cfB> arguments can be used, and each will be considered a separate line of configuration.|
|<B>-dB>, <B>--daemonizeB>||Detach from starting process and run in background (daemonize).|
|<B>-hB>, <B>--helpB>||Print a brief help message, then exit without further action.|
|<B>-VB>, <B>--versionB>||Print version information, then exit without further action.|
|<B>-iB> [ipaddress[:<port>]], <B>--listenB>[=ipaddress[:<port>]]||Additional alias names for this option are --listen-ip and --ip-address. Tells spamd to listen on the specified IP address, defaults to a loopback interface, i.e. --listen localhost). If no value is specified after the switch, or if an asterisk * stands in place of an <ipaddress>, spamd will listen on all interfaces - this is equivalent to address 0.0.0.0 for IPv4 and to :: for IPv6. You can also use a valid hostname which will make spamd listen on all addresses that a name resolves to. The option may be specified multiple times. See also options -4 and -6 for restricting address family to IPv4 or to IPv6. If a port is specified it overrides for this socket the global --port (and --ssl-port) setting. An IPv6 addresses should be enclosed in square brackets, e.g. [::1]:783. For compatibility square brackets on an IPv6 address may be omitted if a port number specification is also omitted.|
|<B>-pB> port, <B>--portB>=port||
Optionally specifies the port number for the server to listen on (default: 783).
If the <B>--sslB> switch is used, and <B>--ssl-portB> is not supplied, then this port will be used to accept SSL connections instead of unencrypted connections. If the <B>--sslB> switch is used, and <B>--ssl-portB> is set, then unencrypted connections will be accepted on the <B>--portB> at the same time as encrypted connections are accepted at <B>--ssl-portB>.
Turn on SQL lookups even when per-user config files have been disabled
with <B>-xB>. this is useful for spamd hosts which dont have users
home directories but do want to load user preferences from an SQL
This inhibits the setuid() behavior, so the -u option is required. If you want the setuid() behaviour, use -Q or --setuid-with-sql instead.
Turn on LDAP lookups. This is completely analog to --sql-config,
only it is using an LDAP server.
Like --sql-config, this disables the setuid behavior, and requires -u. If you want it, use --setuid-with-ldap instead.
|<B>-QB>, <B>--setuid-with-sqlB>||Turn on SQL lookups even when per-user config files have been disabled with <B>-xB> and also setuid to the user. This is useful for spamd hosts which want to load user preferences from an SQL database but also wish to support the use of <B>-HB> (Helper home directories.)|
|<B>--setuid-with-ldapB>||Turn on LDAP lookups even when per-user config files have been disabled with <B>-xB> and also setuid to the user. This is again completely analog to --setuid-with-sql, only it is using an LDAP server.|
This option specifies where per-user preferences can be found for virtual
users, for the <B>-xB> switch. The pattern is used as a base pattern for the
directory name. Any of the following escapes can be used:
The set of characters allowed in the virtual username for this path are restricted to:
All others will be replaced by underscores (_).
This path must be a writable directory. It will be created if it does not already exist. If a file called <B>user_prefsB> exists in this directory (note: <B>notB> in a .spamassassin subdirectory!), it will be loaded as the users preferences. The Bayes databases for that user will be stored in this directory.
|<B>-rB> pidfile, <B>--pidfileB>=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 <B>-uB> option, the file must be writable by that user.|
|<B>-vB>, <B>--vpopmailB>||Enable vpopmail config. If specified with with <B>-uB> set to the vpopmail user, this allows spamd to lookup/create user_prefs in the vpopmail users own maildir. This option is useful for vpopmail virtual users who do not have an entry in the system /etc/passwd file.|
|<B>-sB> facility, <B>--syslogB>=facility||
Specify the syslog facility to use (default: mail). If stderr is specified,
output will be written to stderr. (This is useful if youre running spamd
under the daemontools package.) With a facility of file, all output
goes to spamd.log. facility is interpreted as a file name to log to if it
contains any characters except a-z and 0-9. null disables logging completely
If logging to a file is enabled and that log file is rotated, the spamd server must be restarted with a SIGHUP. (If the log file is just truncated, this is not needed but still recommended.)
Note that logging to a file does not use locking, so you cannot intermix logging from spamd and other processes into the same file. If you want to mix logging like this, use syslog instead.
If you use syslog logging, it is essential to send a SIGHUP to the spamd daemon when you restart the syslogd daemon. (This is due to a shortcoming in Perls syslog handling, where the disappearance of the connection to the syslogd is considered a fatal error.)
Specify how spamd should send messages to syslogd. The type can be any
of the socket types or logging mechanisms as accepted by the subroutine
Sys::Syslog::setlogsock(). Depending on a version of Sys::Syslog and on the
underlying operating system, one of the following values (or their subset) can
be used: native, eventlog, tcp, udp, inet, unix, stream,
pipe, or console. The value eventlog is specific to Win32 events
logger and requires a perl module Win32::EventLog to be installed.
For more information please consult the Sys::Syslog documentation.
A historical setting --syslog-socket=none is mapped to --syslog=stderr.
A default for Windows platforms is none, otherwise 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 old or dysfunctional versions of the <B>Sys::SyslogB> module which do not support some socket types, so you may need to set this option explicitly. If you get error messages regarding <B>__PATH_LOGB> or similar spamd, try changing this setting.
The socket types file is used internally and should not be specified. Use the -s switch instead.
|<B>--log-timestamp-fmtB>=format||The --log-timestamp-fmt option can provide a POSIX strftime(3) format for timestamps included in each logged message. Each logger (stderr, file, syslog) has its own default value for a timestamp format, which applies when --log-timestamp-fmt option is not given, or with --log-timestamp-fmt=default . Timestamps can be turned off by specifying an empty string with this option, e.g. --log-timestamp-fmt= or just --log-timestamp-fmt= . Typical use: --log-timestamp-fmt=%a %b %e %H:%M:%S %Y (provides localized weekday and month names in the ctime(3) style), or %a, %e %b %Y %H:%M:%S %z (%Z) for a RFC 2822 format, or maybe %Y-%m-%d %H:%M:%S%z for an ISO 8601 (EN 28601) format, or just %Y%m%dT%H%M%S .|
|<B>-uB> username, <B>--usernameB>=username||
Run as the named user. If this option is not set, the default behaviour
is to setuid() to the user running spamc, if spamd is running
Note: --username=root is not a valid option. If specified, spamd will exit with a fatal error on startup.
|<B>-gB> groupname, <B>--groupnameB>=groupname||Run as the named group if --username is being used. If this option is not set when --username is used then the primary group for the user given to --username is used.|
|<B>-xB>, <B>--nouser-configB>, <B>--user-configB>||
Turn off (on) reading of per-user configuration files (user_prefs) from the
users home directory. The default behaviour is to read per-user
configuration from the users home directory (<B>--user-configB>).
This option does not disable or otherwise influence the SQL, LDAP or Virtual Config Dir settings.
|<B>--auth-identB>||Verify the username provided by spamc using ident. This is only useful if connections are only allowed from trusted hosts (because an identd that lies is trivial to create) and if spamc REALLY SHOULD be running as the user it represents. Connections are terminated immediately if authentication fails. In this case, spamc will pass the mail through unchecked. Failure to connect to an ident server, and response timeouts are considered authentication failures. This requires that Net::Ident be installed. Deprecated.|
|<B>--ident-timeoutB>=timeout||Wait at most timeout seconds for a response to ident queries. Ident query that takes longer that timeout seconds will fail, and mail will not be processed. Setting this to 0.0 or less results in no timeout, which is STRONGLY discouraged. The default is 5 seconds.|
|<B>-AB> host,..., <B>--allowed-ipsB>=host,...||Specify a comma-separated list of authorized hosts or networks which can connect to this spamd instance. Each element of the list is either a single IP addresses, or a range of IP addresses in address/masklength CIDR notation, or ranges of IPv4 addresses by specifying 3 or less octets with a trailing dot. Hostnames are not supported, only IPv4 or IPv6 addresses. This option can be specified multiple times, or can take a list of addresses separated by commas. IPv6 addresses may be (but need not be) enclosed in square brackets for consistency with option <B>--listenB>. Examples:|
|<B>-DB> [area,...], <B>--debugB> [area,...]||
Produce debugging output. If no areas are listed, all debugging information is
printed. Diagnostic output can also be enabled for each area individually;
area is the area of the code to instrument. For example, to produce
diagnostic output on bayes, learn, and dns, use:
Higher priority informational messages that are suitable for logging in normal circumstances are available with an area of info.
For more information about which areas (also known as channels) are available, please see the documentation at:
|<B>-4B>, <B>--ipv4onlyB>, <B>--ipv4-onlyB>, <B>--ipv4B>||Use IPv4 where applicable, do not use IPv6. The option affects a set of listen sockets (see option --listen) and disables IPv6 for DNS tests.|
|<B>-6B>||Use IPv6 where applicable, do not use IPv4. The option affects a set of listen sockets (see option --listen) and disables IPv4 for DNS tests. Installing a module IO::Socket::IP is recommended if spamd is expected to receive requests over IPv6.|
|<B>-LB>, <B>--localB>||Perform only local tests on all mail. In other words, skip DNS and other network tests. Works the same as the -L flag to spamassassin(1).|
|<B>-PB>, <B>--paranoidB>||Die on user errors (for the user passed from spamc) instead of falling back to user nobody and using the default configuration.|
|<B>-mB> number , <B>--max-childrenB>=number||
This option specifies the maximum number of children to spawn.
Spamd will spawn that number of children, then sleep in the background
until a child dies, wherein it will go and spawn a new child.
Incoming connections can still occur if all of the children are busy, however those connections will be queued waiting for a free child. The minimum value is 1, the default value is 5.
Please note that there is a OS specific maximum of connections that can be queued (Try perl -MSocket -eprint SOMAXCONN to find this maximum).
Note that if you run too many servers for the amount of free RAM available, you run the danger of hurting performance by causing a high swap load as server processes are swapped in and out continually.
|<B>--min-childrenB>=number||The minimum number of children that will be kept running. The minimum value is 1, the default value is 1. If you have lots of free RAM, you may want to increase this.|
|<B>--min-spareB>=number||The lower limit for the number of spare children allowed to run. A spare, or idle, child is one that is not handling a scan request. If there are too few spare children available, a new server will be started every second or so. The default value is 1.|
|<B>--max-spareB>=number||The upper limit for the number of spare children allowed to run. If there are too many spare children, one will be killed every second or so until the number of idle children is in the desired range. The default value is 2.|
|<B>--max-conn-per-childB>=number||This option specifies the maximum number of connections each child should process before dying and letting the master spamd process spawn a new child. The minimum value is 1, the default value is 200.|
|<B>--round-robinB>||By default, spamd will attempt to keep a small number of hot child processes as busy as possible, and keep any others as idle as possible, using something similar to the Apache httpd server scaling algorithm. This is accomplished by the master process coordinating the activities of the children. This switch will disable this scaling algorithm, and the behaviour seen in the 3.0.x versions will be used instead, where all processes receive an equal load and no scaling takes place.|
|<B>--timeout-tcpB>=number||This option specifies the number of seconds to wait for headers from a client (spamc) before closing the connection. The minimum value is 1, the default value is 30, and a value of 0 will disable socket timeouts completely.|
|<B>--timeout-childB>=number||This option specifies the number of seconds to wait for a spamd child to process or check a message. The minimum value is 1, the default value is 300, and a value of 0 will disable child timeouts completely.|
|<B>-HB> directory, <B>--helper-home-dirB>=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 callers home directory instead.|
Accept only SSL connections on the associated port.
The <B>IO::Socket::SSLB> perl module must be installed.
If the <B>--sslB> switch is used, and <B>--ssl-portB> is not supplied, then <B>--portB> port will be used to accept SSL connections instead of unencrypted connections. If the <B>--sslB> switch is used, and <B>--ssl-portB> is set, then unencrypted connections will be accepted on the <B>--portB>, at the same time as encrypted connections are accepted at <B>--ssl-portB>.
|<B>--ssl-portB>=port||Optionally specifies the port number for the server to listen on for SSL connections (default: whatever --port uses). See <B>--sslB> for more details.|
|<B>--server-keyB> keyfile||Specify the SSL key file to use for SSL connections.|
|<B>--server-certB> certfile||Specify the SSL certificate file to use for SSL connections.|
Listen on a UNIX domain socket at path pathname, in addition to
sockets specified with a --listen option. This option is provided
for compatibility with older versions of spamd. Starting with version
3.4.0 the --listen option can also take a UNIX domain socket as its
value (an absolute path name). Unlike --socketpath, the --listen
option may be specified multiple times if spamd needs to listen on
multiple UNIX or INET or INET6 sockets.
Warning: the Perl support on BSD platforms for UNIX domain sockets seems to have a bug regarding paths of over 100 bytes or so (SpamAssassin bug 4380). If you see a could not find newly-created UNIX socket error message, and the path appears truncated, this may be the cause. Try using a shorter path to the socket.
By default, use of <B>--socketpathB> without <B>--listenB> will inhibit SSL connections and unencrypted TCP connections. To add other sockets, specify them with <B>--listenB>, e.g. --listen=: or --listen=*:
|<B>--socketownerB> name||Set UNIX domain socket to be owned by the user named name. Note that this requires that spamd be started as root, and if -u is used, that user should have write permissions to unlink the file later, for when the spamd server is killed.|
|<B>--socketgroupB> name||Set UNIX domain socket to be owned by the group named name. See --socketowner for notes on ownership and permissions.|
|<B>--socketmodeB> mode||Set UNIX domain socket to use the octal mode mode. Note that if -u is used, that user should have write permissions to unlink the file later, for when the spamd server is killed.|
spamc(1) spamassassin(1) Mail::SpamAssassin::Conf(3) Mail::SpamAssassin(3)
The SpamAssassin(tm) Project (http://spamassassin.apache.org/)
SpamAssassin is distributed under the Apache License, Version 2.0, as described in the file LICENSE included with the distribution.
|perl v5.20.3||SPAMD (1)||2016-04-07|