comparison src/dnsbl.h @ 74:b7449114ebb0

start coding on new config syntax
author carl
date Sun, 10 Jul 2005 14:19:00 -0700
parents
children 81f1e400e8ab
comparison
equal deleted inserted replaced
73:2b369f7db7bf 74:b7449114ebb0
1 #ifndef dnsbl_include
2 #define dnsbl_include
3
4 #include "context.h"
5
6 extern bool debug_syslog;
7
8 class recorder;
9 class url_scanner;
10
11 ////////////////////////////////////////////////
12 // mail filter private data, held for us by sendmail
13 //
14 struct mlfiPriv
15 {
16 // connection specific data
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
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
27 bool only_whites; // every recipient is whitelisted?
28 context_map env_to; // map each non-whitelisted recipient to their filtering context
29 recorder *memory; // memory for the content scanner
30 url_scanner *scanner; // object to handle body scanning
31
32 mlfiPriv();
33 ~mlfiPriv();
34 void reset(bool final = false); // for a new message
35 void get_fd();
36 void return_fd();
37 int my_read(char *buf, int len);
38 int my_write(char *buf, int len);
39 void need_content_filter(char *rcpt, CONTEXT &con);
40 };
41
42 void my_syslog(mlfiPriv *priv, char *text);
43 void my_syslog(char *text);
44
45 #endif