summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/rc6
-rw-r--r--libexec/spamd-setup/spamd-setup.814
-rw-r--r--libexec/spamd-setup/spamd-setup.c14
-rw-r--r--libexec/spamd/grey.h4
-rw-r--r--libexec/spamd/spamd.826
-rw-r--r--libexec/spamd/spamd.c12
6 files changed, 38 insertions, 38 deletions
diff --git a/etc/rc b/etc/rc
index d4bda2a1fd5..033bc77d087 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,4 @@
-# $OpenBSD: rc,v 1.298 2007/02/02 14:51:19 ajacoutot Exp $
+# $OpenBSD: rc,v 1.299 2007/02/27 02:10:58 beck Exp $
# System startup script run by init on autoboot
# or after single-user.
@@ -668,8 +668,8 @@ if [ X"${sshd_flags}" != X"NO" ]; then
fi
if [ X"${spamd_flags}" != X"NO" ]; then
- if [ X"${spamd_grey}" != X"NO" ]; then
- spamd_flags="${spamd_flags} -g"
+ if [ X"${spamd_grey}" = X"NO" ]; then
+ spamd_flags="${spamd_flags} -b"
fi
echo -n ' spamd'; eval /usr/libexec/spamd ${spamd_flags}
/usr/libexec/spamd-setup
diff --git a/libexec/spamd-setup/spamd-setup.8 b/libexec/spamd-setup/spamd-setup.8
index 1df1afe7ed2..5022b182488 100644
--- a/libexec/spamd-setup/spamd-setup.8
+++ b/libexec/spamd-setup/spamd-setup.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: spamd-setup.8,v 1.10 2007/02/24 19:28:13 millert Exp $
+.\" $OpenBSD: spamd-setup.8,v 1.11 2007/02/27 02:10:58 beck Exp $
.\"
.\" Copyright (c) 2003 Jason L. Wright (jason@thought.net)
.\" All rights reserved.
@@ -55,11 +55,11 @@ The options are as follows:
.Bl -tag -width Ds
.It Fl d
Debug mode reports a few pieces of information.
-.It Fl g
-Greylisting mode.
-Blacklist data is stored only in
+.It Fl b
+Blacklisting only mode.
+Blacklist data is normally stored only in
.Xr spamd 8 .
-In the absence of this flag, data is stored in both
+With this flag, data is stored in both
.Xr spamd 8
and
.Xr pf 4 .
@@ -70,7 +70,7 @@ No data is shipped to
.El
.Pp
Blacklists and whitelists are specified in the configuration file
-.Pa /etc/spamd.conf
+.Pa /etc/mail/spamd.conf
and are processed in the order specified in the
.Ar all
tag.
@@ -93,7 +93,7 @@ reads all configuration information from a
file.
.Sh FILES
.Bd -literal
-/etc/spamd.conf
+/etc/mail/spamd.conf
.Ed
.Sh SEE ALSO
.Xr ftp 1 ,
diff --git a/libexec/spamd-setup/spamd-setup.c b/libexec/spamd-setup/spamd-setup.c
index da3dcb226f3..4efcbc5f223 100644
--- a/libexec/spamd-setup/spamd-setup.c
+++ b/libexec/spamd-setup/spamd-setup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spamd-setup.c,v 1.31 2007/02/25 22:59:38 millert Exp $ */
+/* $OpenBSD: spamd-setup.c,v 1.32 2007/02/27 02:10:58 beck Exp $ */
/*
* Copyright (c) 2003 Bob Beck. All rights reserved.
@@ -41,7 +41,7 @@
#define PATH_FTP "/usr/bin/ftp"
#define PATH_PFCTL "/sbin/pfctl"
-#define PATH_SPAMD_CONF "/etc/spamd.conf"
+#define PATH_SPAMD_CONF "/etc/mail/spamd.conf"
#define SPAMD_ARG_MAX 256 /* max # of args to an exec */
struct cidr {
@@ -86,7 +86,7 @@ __dead void usage(void);
int debug;
int dryrun;
-int greyonly;
+int greyonly = 1;
extern char *__progname;
@@ -780,7 +780,7 @@ __dead void
usage(void)
{
- fprintf(stderr, "usage: %s [-dgn]\n", __progname);
+ fprintf(stderr, "usage: %s [-bdn]\n", __progname);
exit(1);
}
@@ -793,7 +793,7 @@ main(int argc, char *argv[])
struct servent *ent;
int i, ch;
- while ((ch = getopt(argc, argv, "ndg")) != -1) {
+ while ((ch = getopt(argc, argv, "bdn")) != -1) {
switch (ch) {
case 'n':
dryrun = 1;
@@ -801,8 +801,8 @@ main(int argc, char *argv[])
case 'd':
debug = 1;
break;
- case 'g':
- greyonly = 1;
+ case 'b':
+ greyonly = 0;
break;
default:
usage();
diff --git a/libexec/spamd/grey.h b/libexec/spamd/grey.h
index f3c0b10d98d..5567d86ab60 100644
--- a/libexec/spamd/grey.h
+++ b/libexec/spamd/grey.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: grey.h,v 1.6 2007/02/23 19:22:07 beck Exp $ */
+/* $OpenBSD: grey.h,v 1.7 2007/02/27 02:10:58 beck Exp $ */
/*
* Copyright (c) 2004 Bob Beck. All rights reserved.
@@ -22,7 +22,7 @@
#define WHITEEXP (60 * 60 * 24 * 36) /* remove white entries after 36 days */
#define TRAPEXP (60 * 60 * 24) /* hitting a spamtrap blacklists for a day */
#define PATH_PFCTL "/sbin/pfctl"
-#define PATH_SPAMD_ALLOWEDDOMAINS "/etc/spamd/alloweddomains"
+#define PATH_SPAMD_ALLOWEDDOMAINS "/etc/mail/spamd.alloweddomains"
#define DB_SCAN_INTERVAL 60
#define PATH_SPAMD_DB "/var/db/spamd"
diff --git a/libexec/spamd/spamd.8 b/libexec/spamd/spamd.8
index f170485bfb4..268a2650ac2 100644
--- a/libexec/spamd/spamd.8
+++ b/libexec/spamd/spamd.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: spamd.8,v 1.72 2007/02/25 22:04:12 jmc Exp $
+.\" $OpenBSD: spamd.8,v 1.73 2007/02/27 02:10:58 beck Exp $
.\"
.\" Copyright (c) 2002 Theo de Raadt. All rights reserved.
.\"
@@ -31,9 +31,9 @@
.Sh SYNOPSIS
.Nm spamd
.Bk -words
-.Op Fl 45dgv
+.Op Fl 45bdv
.Op Fl B Ar maxblack
-.Op Fl b Ar address
+.Op Fl l Ar address
.Op Fl c Ar maxcon
.Op Fl G Ar passtime:greyexp:whiteexp
.Op Fl h Ar hostname
@@ -67,7 +67,7 @@ This value may not be greater than maxcon (see below).
The default is
.Ar maxcon
\- 100.
-.It Fl b Ar address
+.It Fl l Ar address
Specify the local address to which
.Nm
is to
@@ -96,8 +96,8 @@ to 4 (hours),
and
.Ar whiteexp
to 864 (hours, approximately 36 days).
-.It Fl g
-Greylisting mode; see
+.It Fl b
+Turn off Greylisting mode, and run only as a blacklister. see
.Sx GREYLISTING
below.
.It Fl h Ar hostname
@@ -319,7 +319,7 @@ Connections from addresses not listed in the
table are redirected to
.Nm .
If an address matches a blacklist specified in
-.Pa /etc/spamd.conf ,
+.Pa /etc/mail/spamd.conf ,
the connection will be stuttered at by
.Nm .
All other connections will be considered for greylisting and
@@ -408,17 +408,17 @@ See
for further details.
.Pp
The file
-.Pa /etc/spamd/alloweddomains
+.Pa /etc/mail/spamd.alloweddomains
can be used to specify a list of domainname suffixes, one per line, one of
which must match each destination email address in the greylist.
Any destination address which does not match one of the suffixes listed in
-.Pa /etc/spamd/alloweddomains
+.Pa /etc/mail/spamd.alloweddomains
will be trapped, exactly as if it were sent to a
.Em spamtrap
address above.
.Pp
For example, if
-.Pa /etc/spamd/alloweddomains
+.Pa /etc/mail/spamd.alloweddomains
contains:
.Bd -literal -offset 4n
@humpingforjesus.com
@@ -453,10 +453,10 @@ section can be used to log connection details to a dedicated file:
daemon.err;daemon.warn;daemon.info /var/log/spamd
.Ed
.Sh FILES
-.Bl -tag -width "/etc/spamd/alloweddomainsXX" -compact
-.It /etc/spamd.conf
+.Bl -tag -width "/etc/mail/spamd.alloweddomainsXX" -compact
+.It /etc/mail/spamd.conf
Default configuration file.
-.It /etc/spamd/alloweddomains
+.It /etc/mail/spamd.alloweddomains
Optional required suffixes for greytrapping.
.It /var/db/spamd
Greylisting database.
diff --git a/libexec/spamd/spamd.c b/libexec/spamd/spamd.c
index e1211e71618..ebd0a8fa697 100644
--- a/libexec/spamd/spamd.c
+++ b/libexec/spamd/spamd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spamd.c,v 1.88 2007/02/23 22:40:50 beck Exp $ */
+/* $OpenBSD: spamd.c,v 1.89 2007/02/27 02:10:58 beck Exp $ */
/*
* Copyright (c) 2002 Theo de Raadt. All rights reserved.
@@ -142,7 +142,7 @@ void
usage(void)
{
fprintf(stderr,
- "usage: spamd [-45dgv] [-B maxblack] [-b address] [-c maxcon]\n");
+ "usage: spamd [-45dbv] [-B maxblack] [-l address] [-c maxcon]\n");
fprintf(stderr,
" [-G mins:hours:hours] [-h host] [-n name] [-p port]\n");
fprintf(stderr,
@@ -984,7 +984,7 @@ main(int argc, char *argv[])
if (gethostname(hostname, sizeof hostname) == -1)
err(1, "gethostname");
- while ((ch = getopt(argc, argv, "45b:c:B:p:dgG:h:r:s:S:n:vw:")) != -1) {
+ while ((ch = getopt(argc, argv, "45l:c:B:p:bdG:h:r:s:S:n:vw:")) != -1) {
switch (ch) {
case '4':
nreply = "450";
@@ -992,7 +992,7 @@ main(int argc, char *argv[])
case '5':
nreply = "550";
break;
- case 'b':
+ case 'l':
bind_address = optarg;
break;
case 'B':
@@ -1012,8 +1012,8 @@ main(int argc, char *argv[])
case 'd':
debug = 1;
break;
- case 'g':
- greylist = 1;
+ case 'b':
+ greylist = 0;
break;
case 'G':
if (sscanf(optarg, "%d:%d:%d", &passtime, &greyexp,