Perform the following steps to deploy Milter.
Obtain and configure a Milter that will perform the actions you desire.
Refer to specific Milter documentation for obtaining and configuring information.
Load and configure the Milter client library. (See 14.2.1 Loading and Configuring the Spam Filtering Software Client Library.)
Specify the path to the client library, libmilter.so. Specify the path and name of the Milter configuration file.
Create a Milter configuration file. with the desired options.
The Milter option file consists of lines of the form option=value. The two required options are HOST and PORT. HOST must be set to the name of the system where the Milter server is running while PORT must be set to the port the Milter server is configured to listen on. Note that only TCP/IP connections are supported; UNIX domain sockets cannot be specified or used.
Several additional options are also available in this options file:
DEBUG (integer, default 0) — Enables or disables debug output from the Milter client library. The larger the value, the more debugging output will be produced. 0 produces no output. 1 provides basic debugging. 2 adds logging of TCP traffic. (Debug output from the Milter server is typically controlled by a setting on the command line used to start the server. Note that most Milters seem to only provide the ability to direct debug output to syslog.)
TIMEOUT (integer, default 3600) — Specifies the timeout in hundredths of seconds for operations involving the Milter connection. Available in 6.3 and later versions.
SOCKS_HOST (string, default "") — Specifies the name of an intermediate SOCKS server. If this option is specified the Milter connection is made through the specified SOCKS server and not directly.
SOCKS_PORT (integer, default 1080) — Specifies the port the intermediate SOCKS server is running on.
SOCKS_PASSWORD (string, default "") — Specifies a password to use in establishing the connection through the SOCKS server. Whether or not a username/password is required depends on the SOCKS server configuration.
Specify what messages to send to Milter.
Messages can be filtered by user, domain, or channel. See 14.2.2 Specifying the Messages to Be Filtered.
Set the spamfilterX_string_action option in the option.dat file:
This setting is used unconditionally, but must be in the MTA options file for Milter to work properly.