Mercurial > dnsbl
diff src/context.h @ 192:8f4a9a37d4d9
delay autowhitelisting to avoid out of office reply bots
author | carl |
---|---|
date | Sun, 11 Nov 2007 12:49:25 -0800 |
parents | 8b86a894514d |
children | 82886d4dd71f |
line wrap: on
line diff
--- a/src/context.h Sat Nov 10 16:20:51 2007 -0800 +++ b/src/context.h Sun Nov 11 12:49:25 2007 -0800 @@ -24,6 +24,7 @@ class VERIFY; class SMTP; class WHITELISTER; +class DELAYWHITE; class recorder; typedef map<char *, char *, ltstr> string_map; @@ -33,6 +34,7 @@ typedef DNSBL * DNSBLP; typedef VERIFY * VERIFYP; typedef WHITELISTER * WHITELISTERP; +typedef DELAYWHITE * DELAYWHITEP; typedef list<DNSBLP> dnsblp_list; typedef map<char *, DNSBLP, ltstr> dnsblp_map; typedef CONTEXT * CONTEXTP; @@ -43,6 +45,7 @@ typedef map<char *, time_t, ltstr> autowhite_sent; typedef map<char *, VERIFYP, ltstr> verify_map; typedef map<char *, WHITELISTERP, ltstr> whitelister_map; +typedef list<DELAYWHITEP> delay_whitelist; class SMTP { static const int maxlen = 1000; @@ -109,6 +112,17 @@ void set_days(int d) {days = d;}; }; +class DELAYWHITE { + char* loto; + WHITELISTERP w; + CONTEXTP con; +public: + DELAYWHITE(char *loto_, WHITELISTERP w_, CONTEXTP con_); + char *get_loto() {return loto;}; + WHITELISTERP get_w() {return w;}; + CONTEXTP get_con() {return con;}; +}; + struct DNSBL { char *name; // nickname for this dns based list char *suffix; // blacklist suffix like blackholes.five-ten-sg.com @@ -261,9 +275,6 @@ void dump(); }; -struct RATELIMIT { - -}; extern char *token_autowhite; extern char *token_black;