Mercurial > dnsbl
comparison src/dnsbl.h @ 214:82886d4dd71f stable-6-0-19
Fixes to compile on Fedora 9 and for const correctness.
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Tue, 10 Jun 2008 08:58:42 -0700 |
parents | 8f4a9a37d4d9 |
children | ad38575e98ca |
comparison
equal
deleted
inserted
replaced
213:44ffef730bc4 | 214:82886d4dd71f |
---|---|
25 struct mlfiPriv | 25 struct mlfiPriv |
26 { | 26 { |
27 // callback specific data | 27 // callback specific data |
28 SMFICTX *ctx; // updated everytime we fetch this priv pointer from the ctx | 28 SMFICTX *ctx; // updated everytime we fetch this priv pointer from the ctx |
29 bool eom; // are we in eom function, so progress function can be called? | 29 bool eom; // are we in eom function, so progress function can be called? |
30 // connection specific data | 30 // connection specific data |
31 CONFIG *pc; // global filtering configuration | 31 CONFIG *pc; // global filtering configuration |
32 int fd; // to talk to dns resolver process | 32 int fd; // to talk to dns resolver process |
33 bool err; // did we get any errors on the resolver socket? | 33 bool err; // did we get any errors on the resolver socket? |
34 int ip; // ip4 address of the smtp client | 34 int ip; // ip4 address of the smtp client |
35 char *helo; // helo from client | 35 const char *helo; // helo from client |
36 map<DNSBLP, bool> checked; // map of dnsblp to result of (ip listed on that dnsbl) | 36 map<DNSBLP, bool> checked; // map of dnsblp to result of (ip listed on that dnsbl) |
37 // message specific data | 37 // message specific data |
38 char *mailaddr; // envelope from value | 38 const char *mailaddr; // envelope from value |
39 char *queueid; // sendmail queue id | 39 const char *queueid; // sendmail queue id |
40 char *authenticated; // client authenticated? if so, suppress all dnsbl checks, but check rate limits | 40 const char *authenticated; // client authenticated? if so, suppress all dnsbl checks, but check rate limits |
41 char *client_name; // fully qualified host name of the smtp client | 41 const char *client_name; // fully qualified host name of the smtp client |
42 bool have_whites; // have at least one whitelisted recipient? need to accept content and remove all non-whitelisted recipients if it fails | 42 bool have_whites; // have at least one whitelisted recipient? need to accept content and remove all non-whitelisted recipients if it fails |
43 bool only_whites; // every recipient is whitelisted? | 43 bool only_whites; // every recipient is whitelisted? |
44 bool want_spamassassin; // at least one non-whitelisted recipient has a non zero spamassassin limit | 44 bool want_spamassassin; // at least one non-whitelisted recipient has a non zero spamassassin limit |
45 bool want_dccgrey; // at least one non-whitelisted recipient wants dcc greylisting | 45 bool want_dccgrey; // at least one non-whitelisted recipient wants dcc greylisting |
46 bool want_dccbulk; // at least one non-whitelisted recipient wants dcc bulk filtering | 46 bool want_dccbulk; // at least one non-whitelisted recipient wants dcc bulk filtering |
47 bool is_bulk_precedence; // have precedence:bulk header to prevent autowhitelisting | 47 bool is_bulk_precedence; // have precedence:bulk header to prevent autowhitelisting |
48 delay_whitelist delayer; // to remember autowhitelisting until we see headers | 48 delay_whitelist delayer; // to remember autowhitelisting until we see headers |
49 CONTEXT *content_context; // first non-whitelisted recipient with a content filtering context | 49 CONTEXT *content_context; // first non-whitelisted recipient with a content filtering context |
50 context_map env_to; // map each non-whitelisted recipient to their filtering context | 50 context_map env_to; // map each non-whitelisted recipient to their filtering context |
51 recorder *memory; // memory for the content scanner | 51 recorder *memory; // memory for the content scanner |
52 url_scanner *scanner; // object to handle body scanning | 52 url_scanner *scanner; // object to handle body scanning |
53 char *content_suffix; // for url body filtering based on ip addresses of hostnames in the body | 53 const char *content_suffix; // for url body filtering based on ip addresses of hostnames in the body |
54 char *content_message; // "" | 54 const char *content_message; // "" |
55 char *uribl_suffix; // for uribl body filtering based on hostnames in the body | 55 const char *uribl_suffix; // for uribl body filtering based on hostnames in the body |
56 char *uribl_message; // "" | 56 const char *uribl_message; // "" |
57 string_set *content_host_ignore; // "" | 57 string_set *content_host_ignore; // "" |
58 SpamAssassin *assassin; | 58 SpamAssassin *assassin; |
59 DccInterface *dccifd; | 59 DccInterface *dccifd; |
60 | 60 |
61 | 61 |
62 mlfiPriv(); | 62 mlfiPriv(); |
63 ~mlfiPriv(); | 63 ~mlfiPriv(); |
64 void reset(bool final = false); // for a new message | 64 void reset(bool final = false); // for a new message |
65 void get_fd(); | 65 void get_fd(); |
66 void return_fd(); | 66 void return_fd(); |
67 size_t my_read(char *buf, size_t len); | 67 size_t my_read(char *buf, size_t len); |
68 size_t my_write(const char *buf, size_t len); | 68 size_t my_write(const char *buf, size_t len); |
69 void need_content_filter(char *rcpt, CONTEXT &con); | 69 void need_content_filter(const char *rcpt, CONTEXT &con); |
70 }; | 70 }; |
71 | 71 |
72 void my_syslog(mlfiPriv *priv, char *text); | 72 void my_syslog(mlfiPriv *priv, const char *text); |
73 void my_syslog(mlfiPriv *priv, string text); | 73 void my_syslog(mlfiPriv *priv, const string text); |
74 void my_syslog(char *text); | 74 void my_syslog(const char *text); |
75 | 75 |
76 #endif | 76 #endif |