comparison src/context.h @ 117:aa07452e641b

uribl patch from Jeff Evans <jeffe@tricab.com>
author carl
date Sun, 12 Mar 2006 10:15:39 -0800
parents f8963ddf7143
children d9d2f8699621
comparison
equal deleted inserted replaced
116:0094678a16d0 117:aa07452e641b
98 bool content_filtering; // 98 bool content_filtering; //
99 char * content_suffix; // for sbl url body filtering 99 char * content_suffix; // for sbl url body filtering
100 char * content_message; // "" 100 char * content_message; // ""
101 string_set content_host_ignore;// hosts to ignore for content sbl checking 101 string_set content_host_ignore;// hosts to ignore for content sbl checking
102 string_set content_tlds; // 102 string_set content_tlds; //
103 string_set content_cctlds; //
103 string_set html_tags; // set of valid html tags 104 string_set html_tags; // set of valid html tags
104 int host_limit; // limit on host names 105 int host_limit; // limit on host names
105 char * host_limit_message; // error message for excessive host names 106 char * host_limit_message; // error message for excessive host names
106 bool host_random; // pick a random selection of host names rather than error for excessive hosts 107 bool host_random; // pick a random selection of host names rather than error for excessive hosts
107 int tag_limit; // limit on bad html tags 108 int tag_limit; // limit on bad html tags
134 void set_content_filtering(bool filter) {content_filtering = filter;}; 135 void set_content_filtering(bool filter) {content_filtering = filter;};
135 void set_content_suffix(char *suffix) {content_suffix = suffix;}; 136 void set_content_suffix(char *suffix) {content_suffix = suffix;};
136 void set_content_message(char *message) {content_message = message;}; 137 void set_content_message(char *message) {content_message = message;};
137 void add_ignore(char *host) {content_host_ignore.insert(host);}; 138 void add_ignore(char *host) {content_host_ignore.insert(host);};
138 void add_tld(char *tld) {content_tlds.insert(tld);}; 139 void add_tld(char *tld) {content_tlds.insert(tld);};
140 void add_cctld(char *cctld) {content_cctlds.insert(cctld);};
139 141
140 void set_host_limit(int limit) {host_limit = limit;}; 142 void set_host_limit(int limit) {host_limit = limit;};
141 void set_host_message(char *message) {host_limit_message = message;}; 143 void set_host_message(char *message) {host_limit_message = message;};
142 void set_host_random(bool random) {host_random = random;}; 144 void set_host_random(bool random) {host_random = random;};
143 void set_tag_limit(int limit) {tag_limit = limit;}; 145 void set_tag_limit(int limit) {tag_limit = limit;};
153 bool get_host_random() {return host_random;}; 155 bool get_host_random() {return host_random;};
154 char* get_content_suffix(); 156 char* get_content_suffix();
155 char* get_content_message(); 157 char* get_content_message();
156 string_set& get_content_host_ignore(); 158 string_set& get_content_host_ignore();
157 string_set& get_content_tlds(); 159 string_set& get_content_tlds();
160 string_set& get_content_cctlds();
158 string_set& get_html_tags(); 161 string_set& get_html_tags();
159 dnsblp_list& get_dnsbl_list(); 162 dnsblp_list& get_dnsbl_list();
160 163
161 bool acceptable_content(recorder &memory, char *&msg); 164 bool acceptable_content(recorder &memory, char *&msg);
162 bool ignore_host(char *host); 165 bool ignore_host(char *host);
184 CONTEXTP find_context(char *to); 187 CONTEXTP find_context(char *to);
185 void dump(); 188 void dump();
186 }; 189 };
187 190
188 extern char *token_black; 191 extern char *token_black;
192 extern char *token_cctld;
189 extern char *token_content; 193 extern char *token_content;
190 extern char *token_context; 194 extern char *token_context;
191 extern char *token_dccfrom; 195 extern char *token_dccfrom;
192 extern char *token_dccto; 196 extern char *token_dccto;
193 extern char *token_default; 197 extern char *token_default;
204 extern char *token_inherit; 208 extern char *token_inherit;
205 extern char *token_lbrace; 209 extern char *token_lbrace;
206 extern char *token_mailhost; 210 extern char *token_mailhost;
207 extern char *token_many; 211 extern char *token_many;
208 extern char *token_off; 212 extern char *token_off;
213 extern char *token_ok2;
209 extern char *token_ok; 214 extern char *token_ok;
210 extern char *token_ok2;
211 extern char *token_on; 215 extern char *token_on;
212 extern char *token_rbrace; 216 extern char *token_rbrace;
213 extern char *token_semi; 217 extern char *token_semi;
214 extern char *token_soft; 218 extern char *token_soft;
215 extern char *token_substitute; 219 extern char *token_substitute;