amavisd-milter(8) | System Manager’s Manual | amavisd-milter(8) |
amavisd-milter - sendmail milter for amavis
amavisd-milter [-Bfhv] [-d debug-level] [-D delivery-care-of] [-m max-conns] [-M max-wait] [-p pidfile] [-P] [-q backlog] [-s socket] [-t timeout] [-S socket] [-T timeout] [-w directory]
The amavisd-milter is a sendmail milter (mail filter) for amavis 2.4.3 and above and sendmail 8.13 and above.
With the amavisd-milter, a full amavis functionality is available, including adding spam and virus information header fields, modifying the Subject, adding address extensions and removing certain recipients from delivery, while delivering the same message to the rest.
For more information you can visit amavisd-milter website:
https://github.com/prehor/amavisd-milter
The options are as follows:
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.
If you use other milters (especially time-consuming), the timeout must be sufficient to process message in all milters.
The socket must be in format proto:address:
The socket must be in format proto:address:
If you use other milters (especially time-consuming), the timeout must be sufficient to process message in all milters.
If the option -B is enabled, amavisd-milter uses the value of the milter macro {daemon_name} as the name of the amavis policy bank. Usually, this milter macro is set to name of the MTA.
When remote client is authenticated, amavisd-milter uses authentication information as the name of the amavis policy banks:
In the amavisd.conf file set protocol and amavis socket to:
$protocol = "AM.PDP"; # Use AM.PDP protocol $unix_socketname = "$MYHOME/amavisd.sock"; # Listen on Unix socket ### $inet_socket_port = 10024; # Do not listen on TCP port
Then (re)start the amavisd daemon.
Add the following entries to Postfix main.cf*:
smtpd_milters = local:<AMAVISD_MILTER.SOCK> milter_connect_macros = j {client_name} {daemon_name} v milter_protocol = 6
Then (re)start the Postfix daemon.
Add the following entries to file sendmail.mc:
define(`confMILTER_MACROS_CONNECT',
confMILTER_MACROS_CONNECT`, {client_resolve}') define(`confMILTER_MACROS_ENVFROM',
confMILTER_MACROS_ENVFROM`, r, b') INPUT_MAIL_FILTER(`amavisd-milter',
`S=local:<AMAVISD_MILTER.SOCK>, F=T, T=S:10m;R:10m;E:10m')
Then rebuild sendmail.cf file, install it and (re)start the sendmail daemon.
This examples assumes that amavis is running as user vscan. The actual name is shown in the $daemon_user variable in amavisd.conf.
To limit the maximum concurrent connections to amavis, run amavisd-milter with this options:
su - amavis -c "amavisd-milter -m 4"
For troubleshooting, run amavisd-milter on the foreground and set the debug level to the appropriate value:
su - amavis -c "amavisd-milter -f -d 4"
Debug levels are:
This manual page was written by Petr Rehor and is based on Jerzy Sakol initial work.
Issues can be reported by using GitHub at:
https://github.com/prehor/amavisd-milter/issues
Full detailed information on how to report issues, please see the Contribution Guidelines at:
https://github.com/prehor/amavisd-milter/blob/master/CONTRIBUTING.md
Enhancements, requests and problem reports are welcome.
If you run into problems, first check the GitHub issues before creating a new one. It is very likely that someone has encountered the same problem and it has already been solved.
Version 1.7.2-1 |