comparison src/dnsbl.h @ 86:c1280cd3e248

add multiple debug syslog levels, remove duplicate dnsbl definitions
author carl
date Tue, 19 Jul 2005 22:47:15 -0700
parents 81f1e400e8ab
children d9d2f8699621
comparison
equal deleted inserted replaced
85:7e4a90e5f213 86:c1280cd3e248
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 bool 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; // content filtering parameters
32 char *content_message; // "" 32 char *content_message; // ""
33 string_set *content_host_ignore; // "" 33 string_set *content_host_ignore; // ""
34 34
35 35
36 mlfiPriv(); 36 mlfiPriv();
37 ~mlfiPriv(); 37 ~mlfiPriv();
38 void reset(bool final = false); // for a new message 38 void reset(bool final = false); // for a new message
39 void get_fd(); 39 void get_fd();
40 void return_fd(); 40 void return_fd();
41 int my_read(char *buf, int len); 41 int my_read(char *buf, int len);
42 int my_write(char *buf, int len); 42 int my_write(char *buf, int len);
43 void need_content_filter(char *rcpt, CONTEXT &con); 43 void need_content_filter(char *rcpt, CONTEXT &con);
44 }; 44 };
45 45
46 void my_syslog(mlfiPriv *priv, char *text); 46 void my_syslog(mlfiPriv *priv, char *text);
47 void my_syslog(char *text); 47 void my_syslog(char *text);
48 48
49 #endif 49 #endif