summaryrefslogtreecommitdiff
path: root/share/man
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2003-03-08 19:26:32 +0000
committerBob Beck <beck@cvs.openbsd.org>2003-03-08 19:26:32 +0000
commit56ab49486a6b199f48e2a37a2fc51ae398893916 (patch)
tree394f0c0056b4c52e151482a94bc091fd007392ae /share/man
parentb9bd73c6a06ebc8234c68be6d786c5ad2da74fe9 (diff)
The description of the config file belongs here, not in spamd-setup(8)
Diffstat (limited to 'share/man')
-rw-r--r--share/man/man5/Makefile6
-rw-r--r--share/man/man5/spamd.conf.5188
2 files changed, 191 insertions, 3 deletions
diff --git a/share/man/man5/Makefile b/share/man/man5/Makefile
index e73cb4e42b3..9f01b56c4c8 100644
--- a/share/man/man5/Makefile
+++ b/share/man/man5/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.30 2002/10/14 21:09:21 miod Exp $
+# $OpenBSD: Makefile,v 1.31 2003/03/08 19:26:31 beck Exp $
# $NetBSD: Makefile,v 1.14 1995/05/11 23:13:15 cgd Exp $
# missing: dump.5 plot.5
@@ -8,8 +8,8 @@ MAN= a.out.5 acct.5 bsd.port.mk.5 bsd.regress.mk.5 core.5 dir.5 disktab.5 \
genassym.cf.5 group.5 hostname.if.5 hosts.equiv.5 hosts.5 intro.5 \
link.5 login.conf.5 moduli.5 motd.5 netgroup.5 networks.5 passwd.5 \
passwd.conf.5 pf.conf.5 phones.5 printcap.5 protocols.5 remote.5 \
- resolv.conf.5 rpc.5 services.5 shells.5 stab.5 sysctl.conf.5 types.5 \
- utmp.5 wsconsctl.conf.5
+ resolv.conf.5 rpc.5 services.5 shells.5 stab.5 spamd.conf.5 \
+ sysctl.conf.5 types.5 utmp.5 wsconsctl.conf.5
MLINKS= dir.5 dirent.5 fs.5 inode.5 utmp.5 wtmp.5 utmp.5 lastlog.5
MLINKS+= hosts.equiv.5 .rhosts.5
MLINKS+= resolv.conf.5 resolver.5
diff --git a/share/man/man5/spamd.conf.5 b/share/man/man5/spamd.conf.5
new file mode 100644
index 00000000000..a9c2551d60c
--- /dev/null
+++ b/share/man/man5/spamd.conf.5
@@ -0,0 +1,188 @@
+.\" $OpenBSD: spamd.conf.5,v 1.1 2003/03/08 19:26:31 beck Exp $
+.\"
+.\" Copyright (c) 2003 Jason L. Wright (jason@thought.net)
+.\" Copyright (c) 2003 Bob Beck
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Jason L. Wright
+.\" 4. The name of the author may not be used to endorse or promote products
+.\" derived from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd March 8, 2003
+.Dt SPAMD.CONF 5
+.Os
+.Sh NAME
+.Nm spamd.conf
+.Nd configuration file read by
+.Xr spamd-setup 8
+for
+.Xr spamd 8
+.Sh SYNOPSIS
+.Nm spamd.conf
+.Sh DESCRIPTION
+The
+.Nm
+file is read by
+.Xr spamd-setup 8
+to configure blacklists and whitelists with corresponding
+.Xr pf 4
+table entries for
+.Xr spamd 8
+.Nm
+follows the syntax of configuration databases as documented in
+.Xr getcap 3 .
+Example:
+.Bd -literal -offset indent
+.Ic all:\e
+.Ic :spews1:white:myblack:\e
+.Ic
+.Ic spews1:\e
+.Ic :black\e
+.Ic :msg=\e"SPAM. Your address \%A is in the spews level\e
+.Ic 1 database\en see http://www.spews.org/ask.cgi?x=%A\en\e":\e
+.Ic :method=http:\e
+.Ic :file=www.spews.org/spews_list_level1.txt:
+.Ic \ \
+.Ic white:\e
+.Ic :white:\e
+.Ic :method=file:\e
+.Ic :file=/var/white/mywhite:\e
+.Ic \ \
+.Ic myblack:\e
+.Ic :black:\e
+.Ic :msg=/var/mail/myblackmsg.txt:\e
+.Ic :method=file:\e
+.Ic :file=/var/mail/myblack.txt
+.Ed
+.Pp
+The default configuration file must include the entry
+.Ar all
+which specifies the order in which named blacklists and whitelists
+are to be applied. The addresses in a whitelist are removed from the
+preceeding blacklist. In the above example, if address that was present
+in all three lists, blacklists
+.Ar spews1
+and
+.Ar myblack
+as well as whitelist
+.Ar white ,
+the address would be removed from blacklist
+.Ar spews1
+by the subsequent
+.Ar white
+whitelist. However, the address would not be removed from the
+.Ar myblack
+blacklist. To remove all the addresses in
+.Ar white
+from
+.Ar myblack
+the configution
+.Bd -literal -offset indent
+.Ic all:\e
+.Ic :spews1:white:myblack:white:\e
+.Ic
+.Ed
+would be used instead.
+.Pp blacklists and whitelists are then constructed by name,
+blacklists are identified by the capability
+.Ar black
+and whitelists by the capability
+.Ar white .
+.Pp
+The source of the addresses for blacklists and whitelists is
+specified using the
+.Ar method
+and
+.Ar file
+capability entries.
+.Ar method
+specifies the method by which to retrieve the addresses, which may
+be
+.Ar http
+.Ar ftp
+.Ar file
+or
+.Ar exec .
+The methods
+.Ar http
+.Ar ftp
+and
+.Ar file
+capabilities will make
+.Nm
+retrieve the source file as specified in the location in
+the
+.Ar file
+capability for the list.
+The
+.Ar exec
+capability will make
+.Nm
+spawn the program with arguments indicated in the
+.Ar file
+capability for the list, and read the source file
+from the output of the program. the source file for each blacklist or
+whitelist is expected to consist of one network block or address per
+line (optionally followed by a space and text that is ignored).
+Comment lines beginning with
+.Ar #
+are ignored.
+Network blocks may be specified in any of the formats as in
+the following example:
+.Bd -literal -offset indent
+.Ic # CIDR format
+.Ic 192.168.20.0/24
+.Ic # A start - end range
+.Ic 192.168.21.0 - 192.168.21.255
+.Ic # As a single IP address
+.Ic 192.168.23.1
+.Ed
+.Pp
+Each blacklist must include a message, specified with the
+.Ar msg
+capability as a string. The argument to
+.Ar msg
+specifies the message, the message may be includes in
+quotes, in which case characters may be escaped as specified in
+.Xr getcap 3
+with the execption that a colon (:) is allowed in the quoted string.
+Alternatively, if the argument to
+.Ar msg
+is not specified in quotes, it is assumed to be a local filename
+from which the message text may be read.
+The message is configured in
+.Xr spamd 8
+to be displayed in the smtp dialogue to any connections that match addresses
+in the blacklist.
+\e\" will produce a double quote in the output,
+and %% will produce a single % in the output.
+%A will be expanded by
+.Xr spamd 8
+to display the connecting IP address in the output.
+.Pp
+.Sh SEE ALSO
+.Xr ftp 1 ,
+.Xr pf 4 ,
+.Xr spamd-setup 8,
+.Xr spamd 8