Mercurial > dnsbl
diff src/context.h @ 178:d6531c702be3
embedded dcc filtering
author | carl |
---|---|
date | Thu, 04 Oct 2007 22:45:21 -0700 |
parents | 83fe0be032c1 |
children | 8b86a894514d |
line wrap: on
line diff
--- a/src/context.h Sun Sep 30 10:27:14 2007 -0700 +++ b/src/context.h Thu Oct 04 22:45:21 2007 -0700 @@ -147,6 +147,9 @@ int tag_limit; // limit on bad html tags char * tag_limit_message; // error message for excessive bad html tags int spamassassin_limit; // max score from spamassassin + bool require_match; // require matching context filtering context + bool dcc_greylist; // should we do dcc greylisting? + 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 int default_rcpt_rate; // if not specified per user @@ -210,7 +213,14 @@ bool set_generic(char *regx, char *msg); char* generic_match(char *client); + void set_require(bool r) {require_match = r; }; + void set_grey(bool g) {dcc_greylist = g; }; + void set_bulk(int b) {dcc_bulk_threshold = b; }; + bool get_content_filtering() {return content_filtering; }; + bool get_require() {return require_match; }; + bool get_grey() {return dcc_greylist; }; + int get_bulk() {return dcc_bulk_threshold;}; int get_host_limit() {return host_limit; }; bool get_host_random() {return host_random; }; int get_spamassassin_limit() {return (content_filtering) ? spamassassin_limit : 0;}; @@ -224,7 +234,7 @@ string_set& get_html_tags(); dnsblp_list& get_dnsbl_list(); - bool acceptable_content(recorder &memory, int score, string& msg); + bool acceptable_content(recorder &memory, int score, int bulk, string& msg); bool ignore_host(char *host); void dump(bool isdefault, bool &spamass, int level = 0); @@ -260,7 +270,9 @@ extern char *token_cctld; extern char *token_content; extern char *token_context; +extern char *token_dccbulk; extern char *token_dccfrom; +extern char *token_dccgrey; extern char *token_dccto; extern char *token_default; extern char *token_dnsbl; @@ -278,12 +290,14 @@ extern char *token_lbrace; extern char *token_mailhost; extern char *token_many; +extern char *token_no; extern char *token_off; +extern char *token_ok; extern char *token_ok2; -extern char *token_ok; extern char *token_on; extern char *token_rate; extern char *token_rbrace; +extern char *token_require; extern char *token_semi; extern char *token_soft; extern char *token_spamassassin; @@ -291,7 +305,9 @@ extern char *token_tld; extern char *token_unknown; extern char *token_uribl; +extern char *token_verify; extern char *token_white; +extern char *token_yes; extern pthread_mutex_t verifier_mutex; // protect the verifier map extern pthread_mutex_t whitelister_mutex; // protect the