comparison src/dnsbl.h @ 163:97d7da45fe2a

spamassassin changes
author carl
date Sun, 26 Aug 2007 19:03:17 -0700
parents c7fc218686f5
children 9b129ed78d7d
comparison
equal deleted inserted replaced
162:c4bce911c276 163:97d7da45fe2a
8 8
9 #ifndef dnsbl_include 9 #ifndef dnsbl_include
10 #define dnsbl_include 10 #define dnsbl_include
11 11
12 #include "context.h" 12 #include "context.h"
13 #include "spamass.h"
13 14
14 extern int debug_syslog; 15 extern int debug_syslog;
15 16
16 class recorder; 17 class recorder;
17 class url_scanner; 18 class url_scanner;
24 // connection specific data 25 // connection specific data
25 CONFIG *pc; // global filtering configuration 26 CONFIG *pc; // global filtering configuration
26 int fd; // to talk to dns resolvers process 27 int fd; // to talk to dns resolvers process
27 bool err; // did we get any errors on the resolver socket? 28 bool err; // did we get any errors on the resolver socket?
28 int ip; // ip4 address of the smtp client 29 int ip; // ip4 address of the smtp client
30 char *helo; // helo from client
29 map<DNSBLP, bool> checked; // map of dnsblp to result of (ip listed on that dnsbl) 31 map<DNSBLP, bool> checked; // map of dnsblp to result of (ip listed on that dnsbl)
30 // message specific data 32 // message specific data
31 char *mailaddr; // envelope from value 33 char *mailaddr; // envelope from value
32 char *queueid; // sendmail queue id 34 char *queueid; // sendmail queue id
33 char *authenticated; // client authenticated? if so, suppress all dnsbl checks, but check rate limits 35 char *authenticated; // client authenticated? if so, suppress all dnsbl checks, but check rate limits
34 bool have_whites; // have at least one whitelisted recipient? need to accept content and remove all non-whitelisted recipients if it fails 36 bool have_whites; // have at least one whitelisted recipient? need to accept content and remove all non-whitelisted recipients if it fails
35 bool only_whites; // every recipient is whitelisted? 37 bool only_whites; // every recipient is whitelisted?
36 context_map env_to; // map each non-whitelisted recipient to their filtering context 38 context_map env_to; // map each non-whitelisted recipient to their filtering context
37 recorder *memory; // memory for the content scanner 39 recorder *memory; // memory for the content scanner
38 url_scanner *scanner; // object to handle body scanning 40 url_scanner *scanner; // object to handle body scanning
39 char *content_suffix; // for url body filtering based on ip addresses of hostnames in the body 41 char *content_suffix; // for url body filtering based on ip addresses of hostnames in the body
40 char *content_message; // "" 42 char *content_message; // ""
41 char *uribl_suffix; // for uribl body filtering based on hostnames in the body 43 char *uribl_suffix; // for uribl body filtering based on hostnames in the body
42 char *uribl_message; // "" 44 char *uribl_message; // ""
43 string_set *content_host_ignore; // "" 45 string_set *content_host_ignore; // ""
46 SpamAssassin *assassin;
44 47
45 48
46 mlfiPriv(); 49 mlfiPriv();
47 ~mlfiPriv(); 50 ~mlfiPriv();
48 void reset(bool final = false); // for a new message 51 void reset(bool final = false); // for a new message
52 int my_write(char *buf, int len); 55 int my_write(char *buf, int len);
53 void need_content_filter(char *rcpt, CONTEXT &con); 56 void need_content_filter(char *rcpt, CONTEXT &con);
54 }; 57 };
55 58
56 void my_syslog(mlfiPriv *priv, char *text); 59 void my_syslog(mlfiPriv *priv, char *text);
60 void my_syslog(mlfiPriv *priv, string text);
57 void my_syslog(char *text); 61 void my_syslog(char *text);
58 62
59 #endif 63 #endif