Mercurial > dnsbl
comparison src/dnsbl.h @ 119:d9d2f8699621
uribl patch from Jeff Evans <jeffe@tricab.com>
author | carl |
---|---|
date | Sun, 12 Mar 2006 12:38:43 -0800 |
parents | c1280cd3e248 |
children | f4746d8a12a3 |
comparison
equal
deleted
inserted
replaced
118:13fcb0c66763 | 119:d9d2f8699621 |
---|---|
1 #ifndef dnsbl_include | 1 #ifndef dnsbl_include |
2 #define dnsbl_include | 2 #define dnsbl_include |
3 | 3 |
4 #include "context.h" | 4 #include "context.h" |
5 | 5 |
6 extern int debug_syslog; | 6 extern int debug_syslog; |
7 | 7 |
8 class recorder; | 8 class recorder; |
9 class url_scanner; | 9 class url_scanner; |
10 | 10 |
11 //////////////////////////////////////////////// | 11 //////////////////////////////////////////////// |
12 // mail filter private data, held for us by sendmail | 12 // mail filter private data, held for us by sendmail |
13 // | 13 // |
14 struct mlfiPriv | 14 struct mlfiPriv |
15 { | 15 { |
16 // connection specific data | 16 // connection specific data |
17 CONFIG *pc; // global filtering configuration | 17 CONFIG *pc; // global filtering configuration |
18 int fd; // to talk to dns resolvers process | 18 int fd; // to talk to dns resolvers process |
19 bool err; // did we get any errors on the resolver socket? | 19 bool err; // did we get any errors on the resolver socket? |
20 int ip; // ip4 address of the smtp client | 20 int ip; // ip4 address of the smtp client |
21 map<DNSBLP, bool> checked; // map of dnsblp to result of (ip listed on that dnsbl) | 21 map<DNSBLP, bool> checked; // map of dnsblp to result of (ip listed on that dnsbl) |
22 // message specific data | 22 // message specific data |
23 char *mailaddr; // envelope from value | 23 char *mailaddr; // envelope from value |
24 char *queueid; // sendmail queue id | 24 char *queueid; // sendmail queue id |
25 bool authenticated; // client authenticated? if so, suppress all dnsbl checks | 25 bool authenticated; // client authenticated? if so, suppress all dnsbl checks |
26 bool have_whites; // have at least one whitelisted recipient? need to accept content and remove all non-whitelisted recipients if it fails | 26 bool have_whites; // have at least one whitelisted recipient? need to accept content and remove all non-whitelisted recipients if it fails |
27 bool only_whites; // every recipient is whitelisted? | 27 bool only_whites; // every recipient is whitelisted? |
28 context_map env_to; // map each non-whitelisted recipient to their filtering context | 28 context_map env_to; // map each non-whitelisted recipient to their filtering context |
29 recorder *memory; // memory for the content scanner | 29 recorder *memory; // memory for the content scanner |
30 url_scanner *scanner; // object to handle body scanning | 30 url_scanner *scanner; // object to handle body scanning |
31 char *content_suffix; // content filtering parameters | 31 char *content_suffix; // for url body filtering based on ip addresses of hostnames in the body |
32 char *content_message; // "" | 32 char *content_message; // "" |
33 char *uribl_suffix; // for uribl body filtering based on hostnames in the body | |
34 char *uribl_message; // "" | |
33 string_set *content_host_ignore; // "" | 35 string_set *content_host_ignore; // "" |
34 | 36 |
35 | 37 |
36 mlfiPriv(); | 38 mlfiPriv(); |
37 ~mlfiPriv(); | 39 ~mlfiPriv(); |
38 void reset(bool final = false); // for a new message | 40 void reset(bool final = false); // for a new message |
39 void get_fd(); | 41 void get_fd(); |
40 void return_fd(); | 42 void return_fd(); |
41 int my_read(char *buf, int len); | 43 int my_read(char *buf, int len); |
42 int my_write(char *buf, int len); | 44 int my_write(char *buf, int len); |
43 void need_content_filter(char *rcpt, CONTEXT &con); | 45 void need_content_filter(char *rcpt, CONTEXT &con); |
44 }; | 46 }; |
45 | 47 |
46 void my_syslog(mlfiPriv *priv, char *text); | 48 void my_syslog(mlfiPriv *priv, char *text); |
47 void my_syslog(char *text); | 49 void my_syslog(char *text); |
48 | 50 |
49 #endif | 51 #endif |