spamassassin-milter 0.0.3

Milter for spam filtering with SpamAssassin
Documentation
.TH SPAMASSASSIN-MILTER 8 2020-02-14
.SH NAME
spamassassin-milter \- milter for spam filtering with SpamAssassin
.SH SYNOPSIS
.B spamassassin-milter
[\fB\-a\fR]
[\fB\-B\fR]
[\fB\-H\fR]
[\fB\-n\fR]
[\fB\-r\fR]
[\fB\-s\fR \fIBYTES\fR]
[\fB\-t\fR \fINETS\fR]
[\fB\-v\fR]
.IR SOCKET
[\fB\-\-\fR \fISPAMC_ARGS\fR...]
.SH DESCRIPTION
.B spamassassin-milter
is a milter that filters email through SpamAssassin server using the
.B spamc
client.
It reads the response from SpamAssassin and adds its
.B X-Spam-
headers to the message, and can optionally apply header and body rewriting to
messages flagged as spam, or reject such messages at the SMTP level.
A message ‘flagged as spam’ is a message with a header
.BR "X-Spam-Flag: YES" .
.PP
The mandatory
.I SOCKET
argument specifies the listening socket to open.
.I SOCKET
can be either an IPv4/IPv6 TCP socket in the form
.BR inet: "\fIPORT\fR" @ "\fIHOST\fR"
or
.BR inet6: "\fIPORT\fR" @ "\fIHOST\fR"
(for example,
.BR inet:3000@localhost ),
or a UNIX domain socket in the form
.BR unix: "\fIPATH\fR"
(for example,
.BR unix:/run/spamassassin-milter.sock ).
After the options and argument, additional arguments
.IR SPAMC_ARGS ...
listed after
.B \-\-
are gathered as arguments to pass to the
.B spamc
invocation.
.B spamassassin-milter
has reasonable defaults and if run with no options, will apply modifications
received from SpamAssassin server.
.\" 3) description of larger context, spamc spamd mta (eg spamc config file!)
.PP
.B spamassassin-milter
is a light-weight integration component, enabling use of SpamAssassin with a
milter-capable MTA.
As such, users must first be familiar with the setup and configuration options
of the components participating, namely, the SpamAssassin programs
.B spamd
(SpamAssassin server) and
.BR spamc ,
and the MTA (Postfix).
.SH OPTIONS
.TP
.BR \-a ", " \-\-auth-untrusted
Treat authenticated senders as untrusted.
If this option is not used, authenticated senders are trusted, and their
messages are not processed with SpamAssassin.
.TP
.BR \-n ", " \-\-dry-run
Process messages as usual, but do not take action or apply any modifications.
Combined with
.BR \-\-verbose ,
this gives accurate insight into what would happen if run without
.BR \-\-dry-run .
.TP
.BR \-h ", " \-\-help
Print usage information.
.TP
.BR \-s ", " \-\-max-message-size " \fIBYTES\fR"
Maximum message size in bytes to pass to
.BR spamc .
.I BYTES
must be equal to or greater than the max size configured for
.BR spamc ,
else it is possible that the body of spam messages is truncated to the size
configured for
.BR spamc .
Defaults to the
.B spamc
default, 512000.
.TP
.BR \-B ", " \-\-preserve-body
Suppress rewriting of spam message body.
If this option is not used, the message body of messages flagged as spam is
replaced with the body received from SpamAssassin (as are the values of related
headers
.B MIME-Version
and
.BR Content-Type ,
if necessary).
.TP
.BR \-H ", " \-\-preserve-headers
Suppress rewriting of headers
.BR Subject ,
.BR From ,
and
.B To
of spam messages.
If this option is not used, these headers of messages flagged as spam will have
their values replaced with the values received from SpamAssassin, if necessary.
.TP
.BR \-r ", " \-\-reject-spam
Reject messages flagged as spam at the SMTP level.
Rejection results in a permanent SMTP error reply being returned to the client,
and the message is not delivered.
.TP
.BR \-t ", " \-\-trusted-networks " \fINETS\fR"
Trust connections coming from the IP networks or addresses
.IR NETS .
Connections from IP addresses contained in trusted networks are not processed
with SpamAssassin.
.I NETS
is a comma-separated list of IP network addresses, for example,
.BR ::1/128,127.0.0.0/8,192.168.1.39 .
If this option is not used, all connections from loopback addresses are trusted.
.TP
.BR \-v ", " \-\-verbose
Enable verbose operation logging.
If this option is not used, only unexpected error conditions are logged (that
is, printed to stderr).
.TP
.BR \-V ", " \-\-version
Print version information.
.SH SEE ALSO
.BR spamassassin (1p),
.BR spamd (8p),
.BR spamc (1)