summaryrefslogtreecommitdiff
path: root/libexec/spamd/grey.h
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2005-03-11 23:09:54 +0000
committerBob Beck <beck@cvs.openbsd.org>2005-03-11 23:09:54 +0000
commit055086c57f1d2f2eae3e4ecfce8c6b2553a4c28e (patch)
tree6e802ef9dbf99eeefc4fbbe71f626683e5cce5df /libexec/spamd/grey.h
parentc9c43400621b4aa0b087174b82fdea6b0928a641 (diff)
"Greytrapping" for spamd - allow for spamd greylisting to maintain
a list of spamtrap destination addresses in the spamd database. When a spamtrap address gets an attempted greylist delivery, blacklist the offending host for a day. Does not affect hosts already whitelisted. ok deraadt@, jmc@, dhartmei@ to get it in so it can be whacked on
Diffstat (limited to 'libexec/spamd/grey.h')
-rw-r--r--libexec/spamd/grey.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/spamd/grey.h b/libexec/spamd/grey.h
index 2d6ae43c92b..de5c6845c38 100644
--- a/libexec/spamd/grey.h
+++ b/libexec/spamd/grey.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: grey.h,v 1.4 2004/10/05 21:04:36 beck Exp $ */
+/* $OpenBSD: grey.h,v 1.5 2005/03/11 23:09:53 beck Exp $ */
/*
* Copyright (c) 2004 Bob Beck. All rights reserved.
@@ -20,6 +20,7 @@
#define PASSTIME (60 * 25) /* pass after first retry seen after 25 mins */
#define GREYEXP (60 * 60 * 4) /* remove grey entries after 4 hours */
#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 DB_SCAN_INTERVAL 60
#define PATH_SPAMD_DB "/var/db/spamd"
@@ -29,7 +30,7 @@ struct gdata {
time_t pass; /* when was it whitelisted */
time_t expire; /* when will we get rid of this entry */
int bcount; /* how many times have we blocked it */
- int pcount; /* how many good connections have we seen after wl */
+ int pcount; /* how many times passed, or -1 for spamtrap */
};
extern int greywatcher(void);