head 1.3; access; symbols cjep_sun2x:1.3.0.44 cjep_sun2x-base:1.3 cjep_staticlib_x-base1:1.3 cjep_staticlib_x:1.3.0.42 cjep_staticlib_x-base:1.3 phil-wifi-20200421:1.3 phil-wifi-20200411:1.3 phil-wifi-20200406:1.3 pgoyette-compat-merge-20190127:1.3 pgoyette-compat-20190127:1.3 pgoyette-compat-20190118:1.3 pgoyette-compat-1226:1.3 pgoyette-compat-1126:1.3 pgoyette-compat-1020:1.3 pgoyette-compat-0930:1.3 pgoyette-compat-0906:1.3 pgoyette-compat-0728:1.3 pgoyette-compat-0625:1.3 pgoyette-compat-0521:1.3 pgoyette-compat-0502:1.3 pgoyette-compat-0422:1.3 pgoyette-compat-0415:1.3 pgoyette-compat-0407:1.3 pgoyette-compat-0330:1.3 pgoyette-compat-0322:1.3 pgoyette-compat-0315:1.3 pgoyette-compat:1.3.0.40 pgoyette-compat-base:1.3 perseant-stdc-iso10646:1.3.0.38 perseant-stdc-iso10646-base:1.3 prg-localcount2-base3:1.3 prg-localcount2-base2:1.3 prg-localcount2-base1:1.3 prg-localcount2:1.3.0.36 prg-localcount2-base:1.3 pgoyette-localcount-20170426:1.3 bouyer-socketcan-base1:1.3 pgoyette-localcount-20170320:1.3 bouyer-socketcan:1.3.0.34 bouyer-socketcan-base:1.3 pgoyette-localcount-20170107:1.3 pgoyette-localcount-20161104:1.3 localcount-20160914:1.3 pgoyette-localcount-20160806:1.3 pgoyette-localcount-20160726:1.3 pgoyette-localcount:1.3.0.32 pgoyette-localcount-base:1.3 netbsd-5-2-3-RELEASE:1.3 netbsd-5-1-5-RELEASE:1.3 yamt-pagecache-base9:1.3 yamt-pagecache-tag8:1.3 tls-earlyentropy:1.3.0.28 tls-earlyentropy-base:1.3 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.3 riastradh-drm2-base3:1.3 netbsd-5-2-2-RELEASE:1.3 netbsd-5-1-4-RELEASE:1.3 netbsd-5-2-1-RELEASE:1.3 netbsd-5-1-3-RELEASE:1.3 agc-symver:1.3.0.30 agc-symver-base:1.3 tls-maxphys-base:1.3 yamt-pagecache-base8:1.3 netbsd-5-2:1.3.0.26 yamt-pagecache-base7:1.3 netbsd-5-2-RELEASE:1.3 netbsd-5-2-RC1:1.3 yamt-pagecache-base6:1.3 yamt-pagecache-base5:1.3 yamt-pagecache-base4:1.3 netbsd-5-1-2-RELEASE:1.3 netbsd-5-1-1-RELEASE:1.3 yamt-pagecache-base3:1.3 yamt-pagecache-base2:1.3 yamt-pagecache:1.3.0.24 yamt-pagecache-base:1.3 bouyer-quota2-nbase:1.3 bouyer-quota2:1.3.0.22 bouyer-quota2-base:1.3 matt-nb5-pq3:1.3.0.20 matt-nb5-pq3-base:1.3 netbsd-5-1:1.3.0.18 netbsd-5-1-RELEASE:1.3 netbsd-5-1-RC4:1.3 netbsd-5-1-RC3:1.3 netbsd-5-1-RC2:1.3 netbsd-5-1-RC1:1.3 netbsd-5-0-2-RELEASE:1.3 netbsd-5-0-1-RELEASE:1.3 jym-xensuspend-nbase:1.3 netbsd-5-0:1.3.0.16 netbsd-5-0-RELEASE:1.3 netbsd-5-0-RC4:1.3 netbsd-5-0-RC3:1.3 netbsd-5-0-RC2:1.3 jym-xensuspend:1.3.0.14 jym-xensuspend-base:1.3 netbsd-5-0-RC1:1.3 netbsd-5:1.3.0.12 netbsd-5-base:1.3 yamt-pf42-base4:1.3 yamt-pf42-base3:1.3 hpcarm-cleanup-nbase:1.3 yamt-pf42-base2:1.3 yamt-pf42:1.3.0.10 yamt-pf42-base:1.3 mjf-devfs2:1.3.0.8 mjf-devfs2-base:1.3 keiichi-mipv6-nbase:1.3 keiichi-mipv6:1.3.0.6 keiichi-mipv6-base:1.3 cube-autoconf:1.3.0.4 cube-autoconf-base:1.3 hpcarm-cleanup:1.3.0.2 hpcarm-cleanup-base:1.3 v3_5:1.1.1.1 OPENBSD:1.1.1; locks; strict; comment @.\" @; 1.3 date 2004.11.14.11.26.45; author yamt; state dead; branches; next 1.2; 1.2 date 2004.06.25.16.27.02; author itojun; state Exp; branches; next 1.1; 1.1 date 2004.06.25.16.11.48; author itojun; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2004.06.25.16.11.48; author itojun; state Exp; branches; next ; desc @@ 1.3 log @merge after importing pf from openbsd 3.6. (userland part) some files were imported to the different places from the previous version. v3_5: etc/pf.conf etc/pf.os etc/spamd.conf share/man/man4/pf.4 share/man/man4/pflog.4 share/man/man5/pf.conf.5 share/man/man5/pf.os.5 share/man/man5/spamd.conf.5 v3_6: dist/pf/etc/pf.conf dist/pf/etc/pf.os dist/pf/etc/spamd.conf dist/pf/share/man/man4/pf.4 dist/pf/share/man/man4/pflog.4 dist/pf/share/man/man5/pf.conf.5 dist/pf/share/man/man5/pf.os.5 dist/pf/share/man/man5/spamd.conf.5 @ text @.\" $NetBSD: spamd.conf.5,v 1.2 2004/06/25 16:27:02 itojun Exp $ .\" $OpenBSD: spamd.conf.5,v 1.12 2004/01/29 17:44:29 jmc 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. .\" .\" 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 all:\e :spews1:white:myblack: spews1:\e :black:\e :msg="SPAM. Your address \&%A is in the spews\e level 1 database\ensee http://www.spews.org/ask.cgi?x=\&%A\en":\e :method=http:\e :file=www.spews.org/spews_list_level1.txt: white:\e :white:\e :method=file:\e :file=/var/mail/mywhite.txt: myblack:\e :black:\e :msg=/var/mail/myblackmsg.txt:\e :method=file:\e :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 preceding blacklist. In the above example, if the address 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 configuration .Bd -literal -offset indent all:\e :spews1:white:myblack:white: .Ed .Pp 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. .Pp .Ar method specifies the method by which to retrieve a file containing a list of addresses that consist of the blacklist or whitelist, and 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 a list of addresses 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 reads a list of addresses from the output of the program. .Pp The format of the list of addresses 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 # CIDR format 192.168.20.0/24 # A start - end range 192.168.21.0 - 192.168.21.255 # As a single IP address 192.168.23.1 .Ed .Pp Each blacklist must include a message, specified in the .Ar msg capability as a string. If the .Ar msg string is enclosed in double quotes, the characters in the quoted string are escaped as specified in .Xr getcap 3 with the exception that a colon (:) is allowed in the quoted string. The resulting string is used as the message. Alternatively, if the .Ar msg string is not specified in quotes, it is assumed to be a local filename from which the message text may be read. .Pp The message is configured in .Xr spamd 8 to be displayed in the SMTP dialogue to any connections that match addresses in the blacklist. The sequence \e" in the message will produce a double quote in the output. The sequence %% will produce a single % in the output, and the sequence \&%A will be expanded in the message by .Xr spamd 8 to display the connecting IP address in the output. .Sh SEE ALSO .Xr ftp 1 , .Xr pf 4 , .Xr spamd 8 , .Xr spamd-setup 8 @ 1.2 log @$NetBSD$ @ text @d1 1 a1 1 .\" $NetBSD$ @ 1.1 log @Initial revision @ text @d1 1 @ 1.1.1.1 log @PF from OpenBSD 3.5 @ text @@