NetBSD/dist/pf/libexec/spamlogd/spamlogd.8

116 lines
2.9 KiB
Groff

.\" $NetBSD: spamlogd.8,v 1.3 2004/11/14 11:26:48 yamt Exp $
.\" $OpenBSD: spamlogd.8,v 1.4 2004/07/14 21:38:09 jmc Exp $
.\"
.\" Copyright (c) 2004 Bob Beck. All rights reserved.
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd February 16, 2004
.Dt SPAMLOGD 8
.Os
.Sh NAME
.Nm spamlogd
.Nd spamd whitelist updating daemon
.Sh SYNOPSIS
.Nm spamlogd
.Op Fl I
.Op Fl i Ar interface
.Sh DESCRIPTION
.Nm
manipulates the
.Xr spamd 8
database in
.Pa /var/db/spamd
used for
.Xr spamd 8
greylisting.
.Nm
updates the
.Pa /var/db/spamd
whitelist entries whenever a connection
to port 25 is logged to the
.Xr pflog 4
interface.
The source addresses of inbound connections are whitelisted
when seen by
.Nm
to ensure that their entries in
.Pa /var/db/spamd
do not expire if the connecting host continues to send legitimate mail.
The destination addresses of outbound connections are whitelisted
when seen by
.Nm
so that replies to outbound mail may be received without initial
greylisting delays
(see
.Sx GREYLISTING
in
.Xr spamd 8 ) .
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl I
Specify that
.Nm
is only to whitelist inbound SMTP connections.
By default
.Nm
will whitelist the source of inbound SMTP connections, and the
target of outbound SMTP connections.
.It Fl i Ar interface
Specify a network interface on which packets must arrive.
The default is to watch for connections logged from any interfaces.
.El
.Pp
It is important to be sure to log any connections to and from your real
MTA in order for
.Nm
to update the whitelist entries.
An example
.Xr pf.conf 5
configuration for logging such connections is as follows:
.Bd -literal -offset indent
EXT_IF = "fxp0"
MAILHOSTS = "{129.128.11.10, 129.128.11.43}"
pass in log on $EXT_IF inet proto tcp to $MAILHOSTS \e
port smtp keep state
pass out log on $EXT_IF inet proto tcp from $MAILHOSTS \e
to any port smtp keep state
.Ed
.Pp
.Nm
sends log messages to
.Xr syslogd 8
using facility
.Em daemon .
.Nm
will log each connection it sees at level
.Dv LOG_DEBUG .
.Sh FILES
/var/db/spamd
.Sh SEE ALSO
.Xr syslog 3 ,
.Xr pflog 4 ,
.Xr spamd.conf 5 ,
.Xr pflogd 8 ,
.Xr spamd 8 ,
.Xr spamd-setup 8 ,
.Xr spamdb 8 ,
.Xr syslogd 8 ,
.Xr tcpdump 8
.Sh HISTORY
The
.Nm
command first appeared in
.Ox 3.5 .