Milter Settings

Centos/RHEL/CloudLinux/AlmaLinux

SMTP milter - smtp_milter
Enable the amavisd-milter on any mail that is received using the Postfix smtpd server running on any of the SMTP ports (25, 587, 465). This should be enabled at all times unless you have a reason to disable spam and virus scanning on your incoming and outgoing SMTP based email.
Default: 1

Non-SMTP milter - non_smtp_milter
Enable the amavisd-milter on any mail that is sent using the Postfix sendmail command-line or the Postfix qmqpd server including any scripts using the PHP mail function. Users who send out a lot of PHP based mail may want to disable this if they do not want it scanned by Amavis. Note that disabling this will also disable any outgoing logging or statistics for any PHP based mail.
Default: 1

Milter default action - milter_default_action
How postfix handles milter application errors like when the amavisd-milter is down. Specify "accept" if you want to receive mail as if the filter does not exist, "tempfail" temporary error status so that the client will try again later, or "reject" to reject mail with a permanent status.
Default: accept

Milter socket - SOCKET
The communication socket between postfix and amavisd. This should not be changed.
Default: inet:10024@127.0.0.1

Max connections - MAX_CONNECTIONS
The maximum concurrent amavisd connections. It must agree with the Max servers entry under Filter settings. The default 0 means an unlimited number of connections.
Default: 0

Max wait - MAX_WAIT
The maximum wait for connection to amavisd in seconds. It must be less then sending MTA timeout for a response to the final "." that terminates a message on sending MTA. We suggest to use less than 10 minutes.
Default: 300

Mail daemon timeout - MAILDAEMON_TIMEOUT
The connection timeout in seconds. It must must be greater than or equal to the amavisd connection timeout. When you use other milters (especially time-consuming), the timeout must be sufficient to process message in all milters.
Default: 600

Amavisd timeout - AMAVISD_TIMEOUT
The amavisd connection timeout in seconds. This timeout must be sufficient for message processing in amavisd. It is usually a good idea to adjust them to the same value as postfix connection timeout.
Default: 600

Amavisd options - AMAVISD_OPTIONS
The parameters listed will be passed directly to amavisd-milter directly. The -B option enables policy bank support and is required. The -P option allows messages to pass though unchecked if Amavis fails.
Default: -B -P

Debian/Ubuntu

SMTP milter - smtp_milter
Enable the amavisd-milter on any mail that is received using the Postfix smtpd server running on any of the SMTP ports (25, 587, 465). This should be enabled at all times unless you have a reason to disable spam and virus scanning on your incoming and outgoing SMTP based email.
Default: 1

Non-SMTP milter - non_smtp_milter
Enable the amavisd-milter on any mail that is sent using the Postfix sendmail command-line or the Postfix qmqpd server including any scripts using the PHP mail function. Users who send out a lot of PHP based mail may want to disable this if they do not want it scanned by Amavis. Note that disabling this will also disable any outgoing logging or statistics for any PHP based mail. Default: 1

Milter default action - milter_default_action
How postfix handles milter application errors like when the amavisd-milter is down. Specify "accept" if you want to receive mail as if the filter does not exist, "tempfail" temporary error status so that the client will try again later, or "reject" to reject mail with a permanent status.
Default: accept

Milter socket - MILTERSOCKET
The communication socket between postfix and amavisd. This should not be changed.
Default: inet:10024@127.0.0.1

Amavisd socket - AMAVISSOCKET
The default location of the amavisd socket.
Default: /var/lib/amavis/amavisd.sock

Working directory - WORKINGDIR
Here amavisd-milter stores the mails which should get checked (needs to be changed when amavisd TEMPBASE variable is modified).
Default: /var/lib/amavis/tmp

Extra parameters - EXTRAPARAMS
The parameters listed will be passed directly to amavisd-milter directly. The -B option enables policy bank support and is required. The -P option allows messages to pass though unchecked if Amavis fails.
Default: -B -P

Amavisd options / Extra parameters

Option Description
-B Uses the milter macro {daemon_name} as the policy bank name (see POLICY BANKS below)
-d debug-level Set the debug level. The debugging traces become more detailed as the debug level increases. Maximum is 9.
-D delivery-care-of Set AM.PDP request attribute delivery_care_of to client (default) or server. When the client method is used, then amavisd-milter is responsible for forwarding the message to the recipients. This method does not allow personalized header or body modification. When the server method is used, then amavis is responsible for forwarding the message to the recipients and may personalize the headers and the body of the messages. $forward_method variable in amavisd.conf must point to a place willing to accept the message without further checking in amavis.
-f Run amavisd-milter in the foreground (i.e. do not daemonize). Print debuging messages to the terminal.
-h Print the help page and exit.
-m max-conns Maximum concurrent amavis connections (default 0 = unlimited number of connections). It must be the same as the $max_servers variable in amavisd.conf.
-M timeout Timeout for message processing in seconds (default 300 seconds = 5 minutes). Must be less then timeout for a response to the final "." that terminates a message on sending MTA. Sendmail uses default value 1 hour, postfix 10 minutes and qmail 20 minutes. Recommended value is less than 10 minutes. If you use other milters (especially time-consuming), the timeout must be sufficient to process message in all milters.
-p pidfile Use this pid file.
-P When the amavis fails, the message will be passed through unchecked.
-q backlog Sets the incoming socket backlog used by listen(2). If it is not set or set to zero, the operating system default is used.
-t timeout Postfix connection timeout in seconds (default 600 = 10 minutes). It must have the same vale as the INPUT_MAIL_FILTER macro in sendmail.mc and must be greater than or equal to the amavis connection timeout. If you use other milters (especially time-consuming), the timeout must be sufficient to process message in all milters.
-T timeout Amavis connection timeout in seconds (default 600 = 10 minutes). Must be sufficient to process message in amavis. Usually, it is a good idea to set them to the same value as sendmail connection timeout.
-v Report the version number and exit.
-w directory Set working directory.