Mercurial > dnsbl
comparison src/context.h @ 178:d6531c702be3
embedded dcc filtering
author | carl |
---|---|
date | Thu, 04 Oct 2007 22:45:21 -0700 |
parents | 83fe0be032c1 |
children | 8b86a894514d |
comparison
equal
deleted
inserted
replaced
177:a4d313c2460b | 178:d6531c702be3 |
---|---|
145 char * host_limit_message; // error message for excessive host names | 145 char * host_limit_message; // error message for excessive host names |
146 bool host_random; // pick a random selection of host names rather than error for excessive hosts | 146 bool host_random; // pick a random selection of host names rather than error for excessive hosts |
147 int tag_limit; // limit on bad html tags | 147 int tag_limit; // limit on bad html tags |
148 char * tag_limit_message; // error message for excessive bad html tags | 148 char * tag_limit_message; // error message for excessive bad html tags |
149 int spamassassin_limit; // max score from spamassassin | 149 int spamassassin_limit; // max score from spamassassin |
150 bool require_match; // require matching context filtering context | |
151 bool dcc_greylist; // should we do dcc greylisting? | |
152 int dcc_bulk_threshold; // off = 0, many = 1000 | |
150 dnsblp_map dnsbl_names; // name to dnsbl mapping for lists that are available in this context and children | 153 dnsblp_map dnsbl_names; // name to dnsbl mapping for lists that are available in this context and children |
151 dnsblp_list dnsbl_list; // list of dnsbls to be used in this context | 154 dnsblp_list dnsbl_list; // list of dnsbls to be used in this context |
152 int default_rcpt_rate; // if not specified per user | 155 int default_rcpt_rate; // if not specified per user |
153 rcpt_rates rcpt_per_hour; // per user limits on number of recipients per hour | 156 rcpt_rates rcpt_per_hour; // per user limits on number of recipients per hour |
154 | 157 |
208 DNSBLP find_dnsbl(char *name); | 211 DNSBLP find_dnsbl(char *name); |
209 | 212 |
210 bool set_generic(char *regx, char *msg); | 213 bool set_generic(char *regx, char *msg); |
211 char* generic_match(char *client); | 214 char* generic_match(char *client); |
212 | 215 |
216 void set_require(bool r) {require_match = r; }; | |
217 void set_grey(bool g) {dcc_greylist = g; }; | |
218 void set_bulk(int b) {dcc_bulk_threshold = b; }; | |
219 | |
213 bool get_content_filtering() {return content_filtering; }; | 220 bool get_content_filtering() {return content_filtering; }; |
221 bool get_require() {return require_match; }; | |
222 bool get_grey() {return dcc_greylist; }; | |
223 int get_bulk() {return dcc_bulk_threshold;}; | |
214 int get_host_limit() {return host_limit; }; | 224 int get_host_limit() {return host_limit; }; |
215 bool get_host_random() {return host_random; }; | 225 bool get_host_random() {return host_random; }; |
216 int get_spamassassin_limit() {return (content_filtering) ? spamassassin_limit : 0;}; | 226 int get_spamassassin_limit() {return (content_filtering) ? spamassassin_limit : 0;}; |
217 char* get_content_suffix(); | 227 char* get_content_suffix(); |
218 char* get_content_message(); | 228 char* get_content_message(); |
222 string_set& get_content_tlds(); | 232 string_set& get_content_tlds(); |
223 string_set& get_content_cctlds(); | 233 string_set& get_content_cctlds(); |
224 string_set& get_html_tags(); | 234 string_set& get_html_tags(); |
225 dnsblp_list& get_dnsbl_list(); | 235 dnsblp_list& get_dnsbl_list(); |
226 | 236 |
227 bool acceptable_content(recorder &memory, int score, string& msg); | 237 bool acceptable_content(recorder &memory, int score, int bulk, string& msg); |
228 bool ignore_host(char *host); | 238 bool ignore_host(char *host); |
229 | 239 |
230 void dump(bool isdefault, bool &spamass, int level = 0); | 240 void dump(bool isdefault, bool &spamass, int level = 0); |
231 }; | 241 }; |
232 | 242 |
258 extern char *token_autowhite; | 268 extern char *token_autowhite; |
259 extern char *token_black; | 269 extern char *token_black; |
260 extern char *token_cctld; | 270 extern char *token_cctld; |
261 extern char *token_content; | 271 extern char *token_content; |
262 extern char *token_context; | 272 extern char *token_context; |
273 extern char *token_dccbulk; | |
263 extern char *token_dccfrom; | 274 extern char *token_dccfrom; |
275 extern char *token_dccgrey; | |
264 extern char *token_dccto; | 276 extern char *token_dccto; |
265 extern char *token_default; | 277 extern char *token_default; |
266 extern char *token_dnsbl; | 278 extern char *token_dnsbl; |
267 extern char *token_dnsbll; | 279 extern char *token_dnsbll; |
268 extern char *token_envfrom; | 280 extern char *token_envfrom; |
276 extern char *token_include; | 288 extern char *token_include; |
277 extern char *token_inherit; | 289 extern char *token_inherit; |
278 extern char *token_lbrace; | 290 extern char *token_lbrace; |
279 extern char *token_mailhost; | 291 extern char *token_mailhost; |
280 extern char *token_many; | 292 extern char *token_many; |
293 extern char *token_no; | |
281 extern char *token_off; | 294 extern char *token_off; |
295 extern char *token_ok; | |
282 extern char *token_ok2; | 296 extern char *token_ok2; |
283 extern char *token_ok; | |
284 extern char *token_on; | 297 extern char *token_on; |
285 extern char *token_rate; | 298 extern char *token_rate; |
286 extern char *token_rbrace; | 299 extern char *token_rbrace; |
300 extern char *token_require; | |
287 extern char *token_semi; | 301 extern char *token_semi; |
288 extern char *token_soft; | 302 extern char *token_soft; |
289 extern char *token_spamassassin; | 303 extern char *token_spamassassin; |
290 extern char *token_substitute; | 304 extern char *token_substitute; |
291 extern char *token_tld; | 305 extern char *token_tld; |
292 extern char *token_unknown; | 306 extern char *token_unknown; |
293 extern char *token_uribl; | 307 extern char *token_uribl; |
308 extern char *token_verify; | |
294 extern char *token_white; | 309 extern char *token_white; |
310 extern char *token_yes; | |
295 | 311 |
296 extern pthread_mutex_t verifier_mutex; // protect the verifier map | 312 extern pthread_mutex_t verifier_mutex; // protect the verifier map |
297 extern pthread_mutex_t whitelister_mutex; // protect the | 313 extern pthread_mutex_t whitelister_mutex; // protect the |
298 | 314 |
299 void discard(string_set &s); | 315 void discard(string_set &s); |