Mercurial > dnsbl
annotate src/dnsbl.h @ 93:591edabaf196
new tlds, add verify example in sample conf file
author | carl |
---|---|
date | Wed, 21 Sep 2005 12:24:44 -0700 |
parents | c1280cd3e248 |
children | d9d2f8699621 |
rev | line source |
---|---|
86
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
1 #ifndef dnsbl_include |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
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 //////////////////////////////////////////////// | |
86
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
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 |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
17 CONFIG *pc; // global filtering configuration |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
18 int fd; // to talk to dns resolvers process |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
19 bool err; // did we get any errors on the resolver socket? |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
20 int ip; // ip4 address of the smtp client |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
21 map<DNSBLP, bool> checked; // map of dnsblp to result of (ip listed on that dnsbl) |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
22 // message specific data |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
23 char *mailaddr; // envelope from value |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
24 char *queueid; // sendmail queue id |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
25 bool authenticated; // client authenticated? if so, suppress all dnsbl checks |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
26 bool have_whites; // have at least one whitelisted recipient? need to accept content and remove all non-whitelisted recipients if it fails |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
27 bool only_whites; // every recipient is whitelisted? |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
28 context_map env_to; // map each non-whitelisted recipient to their filtering context |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
29 recorder *memory; // memory for the content scanner |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
30 url_scanner *scanner; // object to handle body scanning |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
31 char *content_suffix; // content filtering parameters |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
32 char *content_message; // "" |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
33 string_set *content_host_ignore; // "" |
76 | 34 |
74 | 35 |
86
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
36 mlfiPriv(); |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
37 ~mlfiPriv(); |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
38 void reset(bool final = false); // for a new message |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
39 void get_fd(); |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
40 void return_fd(); |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
41 int my_read(char *buf, int len); |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
42 int my_write(char *buf, int len); |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
43 void need_content_filter(char *rcpt, CONTEXT &con); |
74 | 44 }; |
45 | |
86
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
46 void my_syslog(mlfiPriv *priv, char *text); |
c1280cd3e248
add multiple debug syslog levels, remove duplicate dnsbl definitions
carl
parents:
76
diff
changeset
|
47 void my_syslog(char *text); |
74 | 48 |
49 #endif |