annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
74
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
1 #ifndef dnsbl_include
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
2 #define dnsbl_include
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
3
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
4 #include "context.h"
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
5
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
6 extern bool debug_syslog;
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
7
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
8 class recorder;
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
9 class url_scanner;
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
10
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
11 ////////////////////////////////////////////////
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
12 // mail filter private data, held for us by sendmail
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
13 //
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
14 struct mlfiPriv
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
15 {
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
16 // connection specific data
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
17 CONFIG *pc; // global filtering configuration
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
18 int fd; // to talk to dns resolvers process
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
19 bool err; // did we get any errors on the resolver socket?
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
20 int ip; // ip4 address of the smtp client
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
21 map<DNSBLP, bool> checked; // map of dnsblp to result of (ip listed on that dnsbl)
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
22 // message specific data
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
23 char *mailaddr; // envelope from value
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
24 char *queueid; // sendmail queue id
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
25 bool authenticated; // client authenticated? if so, suppress all dnsbl checks
b7449114ebb0 start coding on new config syntax
carl
parents:
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
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
27 bool only_whites; // every recipient is whitelisted?
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
28 context_map env_to; // map each non-whitelisted recipient to their filtering context
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
29 recorder *memory; // memory for the content scanner
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
30 url_scanner *scanner; // object to handle body scanning
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
31
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
32 mlfiPriv();
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
33 ~mlfiPriv();
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
34 void reset(bool final = false); // for a new message
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
35 void get_fd();
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
36 void return_fd();
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
37 int my_read(char *buf, int len);
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
38 int my_write(char *buf, int len);
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
39 void need_content_filter(char *rcpt, CONTEXT &con);
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
40 };
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
41
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
42 void my_syslog(mlfiPriv *priv, char *text);
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
43 void my_syslog(char *text);
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
44
b7449114ebb0 start coding on new config syntax
carl
parents:
diff changeset
45 #endif