Mercurial > dnsbl
comparison src/context.h @ 270:f92f24950bd3 stable-6-0-35
Use mozilla prefix list for tld checking, Enable surbl/uribl/dbl rhs lists
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Mon, 09 Sep 2013 15:15:53 -0700 |
parents | f941563c2a95 |
children | a99b6c1f5f67 |
comparison
equal
deleted
inserted
replaced
269:6d2a11f0ae41 | 270:f92f24950bd3 |
---|---|
159 const char * content_suffix; // for url body filtering based on ip addresses of hostnames in the body | 159 const char * content_suffix; // for url body filtering based on ip addresses of hostnames in the body |
160 const char * content_message; // "" | 160 const char * content_message; // "" |
161 const char * uribl_suffix; // for uribl body filtering based on hostnames in the body | 161 const char * uribl_suffix; // for uribl body filtering based on hostnames in the body |
162 const char * uribl_message; // "" | 162 const char * uribl_message; // "" |
163 string_set content_host_ignore;// hosts to ignore for content sbl checking | 163 string_set content_host_ignore;// hosts to ignore for content sbl checking |
164 string_set content_tlds; // | 164 string_set content_tlds; // names that are tlds |
165 string_set content_cctlds; // | 165 string_set content_tldwilds; // *.names that are tlds |
166 string_set content_tldnots; // names that are not tlds | |
166 string_set html_tags; // set of valid html tags | 167 string_set html_tags; // set of valid html tags |
167 int host_limit; // limit on host names | 168 int host_limit; // limit on host names |
168 const char * host_limit_message; // error message for excessive host names | 169 const char * host_limit_message; // error message for excessive host names |
169 bool host_random; // pick a random selection of host names rather than error for excessive hosts | 170 bool host_random; // pick a random selection of host names rather than error for excessive hosts |
170 int tag_limit; // limit on bad html tags | 171 int tag_limit; // limit on bad html tags |
225 void set_content_suffix(const char *suffix) {content_suffix = suffix; }; | 226 void set_content_suffix(const char *suffix) {content_suffix = suffix; }; |
226 void set_content_message(const char *message) {content_message = message; }; | 227 void set_content_message(const char *message) {content_message = message; }; |
227 void set_uribl_suffix(const char *suffix) {uribl_suffix = suffix; }; | 228 void set_uribl_suffix(const char *suffix) {uribl_suffix = suffix; }; |
228 void set_uribl_message(const char *message) {uribl_message = message; }; | 229 void set_uribl_message(const char *message) {uribl_message = message; }; |
229 void add_ignore(const char *host) {content_host_ignore.insert(host);}; | 230 void add_ignore(const char *host) {content_host_ignore.insert(host);}; |
230 void add_tld(const char *tld) {content_tlds.insert(tld); }; | 231 void add_tld(const char *tld); |
231 void add_cctld(const char *cctld) {content_cctlds.insert(cctld); }; | |
232 | 232 |
233 void set_host_limit(int limit) {host_limit = limit; }; | 233 void set_host_limit(int limit) {host_limit = limit; }; |
234 void set_host_message(const char *message) {host_limit_message = message;}; | 234 void set_host_message(const char *message) {host_limit_message = message;}; |
235 void set_host_random(bool random) {host_random = random; }; | 235 void set_host_random(bool random) {host_random = random; }; |
236 void set_spamassassin_limit(int limit) {spamassassin_limit = limit; }; | 236 void set_spamassassin_limit(int limit) {spamassassin_limit = limit; }; |
271 const char* get_content_message(); | 271 const char* get_content_message(); |
272 const char* get_uribl_suffix(); | 272 const char* get_uribl_suffix(); |
273 const char* get_uribl_message(); | 273 const char* get_uribl_message(); |
274 string_set& get_content_host_ignore(); | 274 string_set& get_content_host_ignore(); |
275 string_set& get_content_tlds(); | 275 string_set& get_content_tlds(); |
276 string_set& get_content_cctlds(); | 276 string_set& get_content_tldwilds(); |
277 string_set& get_content_tldnots(); | |
277 string_set& get_html_tags(); | 278 string_set& get_html_tags(); |
278 dnsblp_list& get_dnsbl_list(); | 279 dnsblp_list& get_dnsbl_list(); |
279 dnswlp_list& get_dnswl_list(); | 280 dnswlp_list& get_dnswl_list(); |
280 | 281 |
281 bool acceptable_content(recorder &memory, int score, int bulk, string& msg); | 282 bool acceptable_content(recorder &memory, int score, int bulk, string& msg); |
304 CONTEXTP find_context(const char *to); | 305 CONTEXTP find_context(const char *to); |
305 void dump(); | 306 void dump(); |
306 }; | 307 }; |
307 | 308 |
308 | 309 |
310 extern const char *token_asterisk; | |
309 extern const char *token_autowhite; | 311 extern const char *token_autowhite; |
312 extern const char *token_bang; | |
310 extern const char *token_black; | 313 extern const char *token_black; |
311 extern const char *token_cctld; | |
312 extern const char *token_content; | 314 extern const char *token_content; |
313 extern const char *token_context; | 315 extern const char *token_context; |
314 extern const char *token_dccbulk; | 316 extern const char *token_dccbulk; |
315 extern const char *token_dccfrom; | 317 extern const char *token_dccfrom; |
316 extern const char *token_dccgrey; | 318 extern const char *token_dccgrey; |
336 extern const char *token_no; | 338 extern const char *token_no; |
337 extern const char *token_off; | 339 extern const char *token_off; |
338 extern const char *token_ok; | 340 extern const char *token_ok; |
339 extern const char *token_ok2; | 341 extern const char *token_ok2; |
340 extern const char *token_on; | 342 extern const char *token_on; |
343 extern const char *token_period; | |
341 extern const char *token_rate; | 344 extern const char *token_rate; |
342 extern const char *token_rbrace; | 345 extern const char *token_rbrace; |
343 extern const char *token_require; | 346 extern const char *token_require; |
344 extern const char *token_requirerdns; | 347 extern const char *token_requirerdns; |
345 extern const char *token_semi; | 348 extern const char *token_semi; |