comparison src/context.h @ 167:9b129ed78d7d stable-6-0-6

actually use spamassassin result, allow build without spam assassin, only call it if some recipient needs it.
author carl
date Mon, 27 Aug 2007 20:49:19 -0700
parents 5809bcdc325b
children 6bac960af6b4
comparison
equal deleted inserted replaced
166:7161d8451fcf 167:9b129ed78d7d
189 void add_ignore(char *host) {content_host_ignore.insert(host);}; 189 void add_ignore(char *host) {content_host_ignore.insert(host);};
190 void add_tld(char *tld) {content_tlds.insert(tld); }; 190 void add_tld(char *tld) {content_tlds.insert(tld); };
191 void add_cctld(char *cctld) {content_cctlds.insert(cctld); }; 191 void add_cctld(char *cctld) {content_cctlds.insert(cctld); };
192 192
193 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; };
195 void set_host_message(char *message) {host_limit_message = message;}; 194 void set_host_message(char *message) {host_limit_message = message;};
196 void set_host_random(bool random) {host_random = random; }; 195 void set_host_random(bool random) {host_random = random; };
196 void set_spamassassin_limit(int limit) {spamassassin_limit = limit; };
197 void set_tag_limit(int limit) {tag_limit = limit; }; 197 void set_tag_limit(int limit) {tag_limit = limit; };
198 void set_tag_message(char *message) {tag_limit_message = message;}; 198 void set_tag_message(char *message) {tag_limit_message = message;};
199 void add_tag(char *tag) {html_tags.insert(tag); }; 199 void add_tag(char *tag) {html_tags.insert(tag); };
200 200
201 void add_dnsbl(char *name, DNSBLP dns) {dnsbl_names[name] = dns; }; 201 void add_dnsbl(char *name, DNSBLP dns) {dnsbl_names[name] = dns; };
202 void add_dnsbl(DNSBLP dns) {dnsbl_list.push_back(dns);}; 202 void add_dnsbl(DNSBLP dns) {dnsbl_list.push_back(dns);};
203 DNSBLP find_dnsbl(char *name); 203 DNSBLP find_dnsbl(char *name);
204 204
205 bool get_content_filtering() {return content_filtering; }; 205 bool get_content_filtering() {return content_filtering; };
206 int get_host_limit() {return host_limit; }; 206 int get_host_limit() {return host_limit; };
207 int get_spamassassin_limit() {return spamassassin_limit;};
208 bool get_host_random() {return host_random; }; 207 bool get_host_random() {return host_random; };
208 int get_spamassassin_limit() {return (content_filtering) ? spamassassin_limit : 0;};
209 char* get_content_suffix(); 209 char* get_content_suffix();
210 char* get_content_message(); 210 char* get_content_message();
211 char* get_uribl_suffix(); 211 char* get_uribl_suffix();
212 char* get_uribl_message(); 212 char* get_uribl_message();
213 string_set& get_content_host_ignore(); 213 string_set& get_content_host_ignore();
214 string_set& get_content_tlds(); 214 string_set& get_content_tlds();
215 string_set& get_content_cctlds(); 215 string_set& get_content_cctlds();
216 string_set& get_html_tags(); 216 string_set& get_html_tags();
217 dnsblp_list& get_dnsbl_list(); 217 dnsblp_list& get_dnsbl_list();
218 218
219 bool acceptable_content(recorder &memory, int score, char *&msg); 219 bool acceptable_content(recorder &memory, int score, string& msg);
220 bool ignore_host(char *host); 220 bool ignore_host(char *host);
221 221
222 void dump(bool isdefault, int level = 0); 222 void dump(bool isdefault, bool &spamass, int level = 0);
223 }; 223 };
224 224
225 225
226 struct CONFIG { 226 struct CONFIG {
227 // the only mutable stuff once it has been loaded from the config file 227 // the only mutable stuff once it has been loaded from the config file