comparison src/context.h @ 163:97d7da45fe2a

spamassassin changes
author carl
date Sun, 26 Aug 2007 19:03:17 -0700
parents c4bce911c276
children 5809bcdc325b
comparison
equal deleted inserted replaced
162:c4bce911c276 163:97d7da45fe2a
140 int host_limit; // limit on host names 140 int host_limit; // limit on host names
141 char * host_limit_message; // error message for excessive host names 141 char * host_limit_message; // error message for excessive host names
142 bool host_random; // pick a random selection of host names rather than error for excessive hosts 142 bool host_random; // pick a random selection of host names rather than error for excessive hosts
143 int tag_limit; // limit on bad html tags 143 int tag_limit; // limit on bad html tags
144 char * tag_limit_message; // error message for excessive bad html tags 144 char * tag_limit_message; // error message for excessive bad html tags
145 int spamassassin_limit; // max score from spamassassin
145 dnsblp_map dnsbl_names; // name to dnsbl mapping for lists that are available in this context and children 146 dnsblp_map dnsbl_names; // name to dnsbl mapping for lists that are available in this context and children
146 dnsblp_list dnsbl_list; // list of dnsbls to be used in this context 147 dnsblp_list dnsbl_list; // list of dnsbls to be used in this context
147 int default_rcpt_rate; // if not specified per user 148 int default_rcpt_rate; // if not specified per user
148 rcpt_rates rcpt_per_hour; // per user limits on number of recipients per hour 149 rcpt_rates rcpt_per_hour; // per user limits on number of recipients per hour
149 150
178 void set_from_default(char *status) {env_from_default = status;}; 179 void set_from_default(char *status) {env_from_default = status;};
179 char* find_from(char *from); 180 char* find_from(char *from);
180 CONTEXTP find_context(char *from); 181 CONTEXTP find_context(char *from);
181 CONTEXTP find_from_context_name(char *name); 182 CONTEXTP find_from_context_name(char *name);
182 183
183 void set_content_filtering(bool filter) {content_filtering = filter;}; 184 void set_content_filtering(bool filter) {content_filtering = filter; };
184 void set_content_suffix(char *suffix) {content_suffix = suffix;}; 185 void set_content_suffix(char *suffix) {content_suffix = suffix; };
185 void set_content_message(char *message) {content_message = message;}; 186 void set_content_message(char *message) {content_message = message; };
186 void set_uribl_suffix(char *suffix) {uribl_suffix = suffix;}; 187 void set_uribl_suffix(char *suffix) {uribl_suffix = suffix; };
187 void set_uribl_message(char *message) {uribl_message = message;}; 188 void set_uribl_message(char *message) {uribl_message = message; };
188 void add_ignore(char *host) {content_host_ignore.insert(host);}; 189 void add_ignore(char *host) {content_host_ignore.insert(host);};
189 void add_tld(char *tld) {content_tlds.insert(tld);}; 190 void add_tld(char *tld) {content_tlds.insert(tld); };
190 void add_cctld(char *cctld) {content_cctlds.insert(cctld);}; 191 void add_cctld(char *cctld) {content_cctlds.insert(cctld); };
191 192
192 void set_host_limit(int limit) {host_limit = limit;}; 193 void set_host_limit(int limit) {host_limit = limit; };
194 void set_spamassassin_limit(int limit) {spamassassin_limit = limit; };
193 void set_host_message(char *message) {host_limit_message = message;}; 195 void set_host_message(char *message) {host_limit_message = message;};
194 void set_host_random(bool random) {host_random = random;}; 196 void set_host_random(bool random) {host_random = random; };
195 void set_tag_limit(int limit) {tag_limit = limit;}; 197 void set_tag_limit(int limit) {tag_limit = limit; };
196 void set_tag_message(char *message) {tag_limit_message = message;}; 198 void set_tag_message(char *message) {tag_limit_message = message;};
197 void add_tag(char *tag) {html_tags.insert(tag);}; 199 void add_tag(char *tag) {html_tags.insert(tag); };
198 200
199 void add_dnsbl(char *name, DNSBLP dns) {dnsbl_names[name] = dns;}; 201 void add_dnsbl(char *name, DNSBLP dns) {dnsbl_names[name] = dns; };
200 void add_dnsbl(DNSBLP dns) {dnsbl_list.push_back(dns);}; 202 void add_dnsbl(DNSBLP dns) {dnsbl_list.push_back(dns);};
201 DNSBLP find_dnsbl(char *name); 203 DNSBLP find_dnsbl(char *name);
202 204
203 bool get_content_filtering() {return content_filtering;}; 205 bool get_content_filtering() {return content_filtering; };
204 int get_host_limit() {return host_limit;}; 206 int get_host_limit() {return host_limit; };
205 bool get_host_random() {return host_random;}; 207 int get_spamassassin_limit() {return spamassassin_limit;};
208 bool get_host_random() {return host_random; };
206 char* get_content_suffix(); 209 char* get_content_suffix();
207 char* get_content_message(); 210 char* get_content_message();
208 char* get_uribl_suffix(); 211 char* get_uribl_suffix();
209 char* get_uribl_message(); 212 char* get_uribl_message();
210 string_set& get_content_host_ignore(); 213 string_set& get_content_host_ignore();
211 string_set& get_content_tlds(); 214 string_set& get_content_tlds();
212 string_set& get_content_cctlds(); 215 string_set& get_content_cctlds();
213 string_set& get_html_tags(); 216 string_set& get_html_tags();
214 dnsblp_list& get_dnsbl_list(); 217 dnsblp_list& get_dnsbl_list();
215 218
216 bool acceptable_content(recorder &memory, char *&msg); 219 bool acceptable_content(recorder &memory, int score, char *&msg);
217 bool ignore_host(char *host); 220 bool ignore_host(char *host);
218 221
219 void dump(bool isdefault, int level = 0); 222 void dump(bool isdefault, int level = 0);
220 }; 223 };
221 224
272 extern char *token_on; 275 extern char *token_on;
273 extern char *token_rate; 276 extern char *token_rate;
274 extern char *token_rbrace; 277 extern char *token_rbrace;
275 extern char *token_semi; 278 extern char *token_semi;
276 extern char *token_soft; 279 extern char *token_soft;
280 extern char *token_spamassassin;
277 extern char *token_substitute; 281 extern char *token_substitute;
278 extern char *token_tld; 282 extern char *token_tld;
279 extern char *token_unknown; 283 extern char *token_unknown;
280 extern char *token_uribl; 284 extern char *token_uribl;
281 extern char *token_white; 285 extern char *token_white;