Mercurial > dnsbl
annotate src/dnsbl.h @ 136:f4746d8a12a3
add smtp auth rate limits
author | carl |
---|---|
date | Tue, 26 Sep 2006 13:59:14 -0700 |
parents | d9d2f8699621 |
children | ecb40aa3eaa5 |
rev | line source |
---|---|
119 | 1 #ifndef dnsbl_include |
2 #define dnsbl_include | |
74 | 3 |
4 #include "context.h" | |
5 | |
86
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
6 extern int debug_syslog; |
74 | 7 |
8 class recorder; | |
9 class url_scanner; | |
10 | |
11 //////////////////////////////////////////////// | |
119 | 12 // mail filter private data, held for us by sendmail |
74 | 13 // |
14 struct mlfiPriv | |
15 { | |
86
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
16 // connection specific data |
119 | 17 CONFIG *pc; // global filtering configuration |
18 int fd; // to talk to dns resolvers process | |
19 bool err; // did we get any errors on the resolver socket? | |
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) | |
22 // message specific data | |
23 char *mailaddr; // envelope from value | |
24 char *queueid; // sendmail queue id | |
136 | 25 char *authenticated; // client authenticated? if so, suppress all dnsbl checks, but check rate limits |
119 | 26 bool have_whites; // have at least one whitelisted recipient? need to accept content and remove all non-whitelisted recipients if it fails |
86
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
27 bool only_whites; // every recipient is whitelisted? |
119 | 28 context_map env_to; // map each non-whitelisted recipient to their filtering context |
86
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
29 recorder *memory; // memory for the content scanner |
119 | 30 url_scanner *scanner; // object to handle body scanning |
31 char *content_suffix; // for url body filtering based on ip addresses of hostnames in the body | |
86
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
32 char *content_message; // "" |
119 | 33 char *uribl_suffix; // for uribl body filtering based on hostnames in the body |
34 char *uribl_message; // "" | |
86
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
35 string_set *content_host_ignore; // "" |
76 | 36 |
74 | 37 |
86
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
38 mlfiPriv(); |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
39 ~mlfiPriv(); |
119 | 40 void reset(bool final = false); // for a new message |
86
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
41 void get_fd(); |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
42 void return_fd(); |
119 | 43 int my_read(char *buf, int len); |
44 int my_write(char *buf, int len); | |
86
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
45 void need_content_filter(char *rcpt, CONTEXT &con); |
74 | 46 }; |
47 | |
119 | 48 void my_syslog(mlfiPriv *priv, char *text); |
49 void my_syslog(char *text); | |
74 | 50 |
51 #endif |