Mercurial > dnsbl
diff src/context.h @ 255:d6d5c50b9278 stable-6-0-30
Allow dnswl_list and dnsbl_list to be empty, to override lists specified in the ancestor contexts. Add daily recipient limits as a multiple of the hourly limits.
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Mon, 09 Apr 2012 18:02:05 -0700 |
parents | 15bf4f68a0b2 |
children | be939802c64e |
line wrap: on
line diff
--- a/src/context.h Sun Apr 08 16:17:53 2012 -0700 +++ b/src/context.h Mon Apr 09 18:02:05 2012 -0700 @@ -175,9 +175,12 @@ int dcc_bulk_threshold; // off = 0, many = 1000 dnsblp_map dnsbl_names; // name to dnsbl mapping for lists that are available in this context and children dnsblp_list dnsbl_list; // list of dnsbls to be used in this context + bool dnsbl_list_parsed; // true iff we have actually parsed a dnsbl_list dnswlp_map dnswl_names; // name to dnswl mapping for lists that are available in this context and children dnswlp_list dnswl_list; // list of dnswls to be used in this context + bool dnswl_list_parsed; // true iff we have actually parsed a dnswl_list int default_rcpt_rate; // if not specified per user + int rcpt_daily_multiple;// daily multiplier applied to hourly rate rcpt_rates rcpt_per_hour; // per user limits on number of recipients per hour @@ -203,8 +206,10 @@ WHITELISTERP find_autowhite(const char *from, const char *to); void set_default_rate(int limit) {default_rcpt_rate = limit;}; + void set_daily_multiple(int multiple) {rcpt_daily_multiple = multiple;}; void add_rate(const char *user, int limit) {rcpt_per_hour[user] = limit;}; int find_rate(const char *user); + int get_daily_multiple() {return rcpt_daily_multiple;}; void add_to(const char *to) {env_to.insert(to);}; void add_from(const char *from, const char *status) {env_from[from] = status;}; @@ -234,10 +239,12 @@ void add_dnsbl(const char *name, DNSBLP dns) {dnsbl_names[name] = dns; }; void add_dnsbl(DNSBLP dns) {dnsbl_list.push_back(dns);}; DNSBLP find_dnsbl(const char *name); + void set_dnsbll_parsed() {dnsbl_list_parsed = true;}; void add_dnswl(const char *name, DNSWLP dns) {dnswl_names[name] = dns; }; void add_dnswl(DNSWLP dns) {dnswl_list.push_back(dns);}; DNSWLP find_dnswl(const char *name); + void set_dnswll_parsed() {dnswl_list_parsed = true;}; bool set_white(const char *regx); bool white_match(const char *from);