Mercurial > dnsbl
comparison src/context.h @ 382:c378e9d03f37
start parsing spf txt records
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Mon, 06 Mar 2017 12:21:05 -0800 |
parents | 879a470c6ac3 |
children | 22027ad2a28f |
comparison
equal
deleted
inserted
replaced
381:879a470c6ac3 | 382:c378e9d03f37 |
---|---|
23 class WHITELISTER; | 23 class WHITELISTER; |
24 class DELAYWHITE; | 24 class DELAYWHITE; |
25 class recorder; | 25 class recorder; |
26 class mlfiPriv; | 26 class mlfiPriv; |
27 | 27 |
28 typedef map<const char *, const char *, ltstr> string_map; | 28 typedef map<const char *, const char *, ltstr> string_map; |
29 typedef set<int> int_set; | 29 typedef set<int> int_set; |
30 typedef set<int32_t> int32_t_set; | 30 typedef set<int32_t> int32_t_set; |
31 typedef int32_t_set * int32_t_set_p; | 31 typedef int32_t_set * int32_t_set_p; |
32 typedef list<SMTP *> smtp_list; | 32 typedef set<uint32_t> uint32_t_set; |
33 typedef DKIM * DKIMP; | 33 typedef uint32_t_set * uint32_t_set_p; |
34 typedef DNSBL * DNSBLP; | 34 typedef list<SMTP *> smtp_list; |
35 typedef DNSWL * DNSWLP; | 35 typedef DKIM * DKIMP; |
36 typedef VERIFY * VERIFYP; | 36 typedef DNSBL * DNSBLP; |
37 typedef WHITELISTER * WHITELISTERP; | 37 typedef DNSWL * DNSWLP; |
38 typedef DELAYWHITE * DELAYWHITEP; | 38 typedef VERIFY * VERIFYP; |
39 typedef map<const char *, DKIMP, ltstr> dkimp_map; | 39 typedef WHITELISTER * WHITELISTERP; |
40 typedef list<DNSBLP> dnsblp_list; | 40 typedef DELAYWHITE * DELAYWHITEP; |
41 typedef map<const char *, DNSBLP, ltstr> dnsblp_map; | 41 typedef map<const char *, DKIMP, ltstr> dkimp_map; |
42 typedef list<DNSWLP> dnswlp_list; | 42 typedef list<DNSBLP> dnsblp_list; |
43 typedef map<const char *, DNSWLP, ltstr> dnswlp_map; | 43 typedef map<const char *, DNSBLP, ltstr> dnsblp_map; |
44 typedef CONTEXT * CONTEXTP; | 44 typedef list<DNSWLP> dnswlp_list; |
45 typedef list<CONTEXTP> context_list; | 45 typedef map<const char *, DNSWLP, ltstr> dnswlp_map; |
46 typedef map<const char *, CONTEXTP, ltstr> context_map; | 46 typedef CONTEXT * CONTEXTP; |
47 typedef map<const char *, int32_t, ltstr> ns_mapper; // name to ipv4 address | 47 typedef list<CONTEXTP> context_list; |
48 typedef map<const char *, int, ltstr> rates; | 48 typedef map<const char *, CONTEXTP, ltstr> context_map; |
49 typedef map<const char *, int32_t_set_p, ltstr> auth_addresses; | 49 typedef map<const char *, uint32_t, ltstr> ns_mapper; // name to ipv4 address |
50 typedef map<const char *, time_t, ltstr> autowhite_sent; | 50 typedef map<const char *, int, ltstr> rates; |
51 typedef map<const char *, VERIFYP, ltstr> verify_map; | 51 typedef map<const char *, uint32_t_set_p, ltstr> auth_addresses; |
52 typedef map<const char *, WHITELISTERP, ltstr> whitelister_map; | 52 typedef map<const char *, time_t, ltstr> autowhite_sent; |
53 typedef list<DELAYWHITEP> delay_whitelist; | 53 typedef map<const char *, VERIFYP, ltstr> verify_map; |
54 typedef map<const char *, WHITELISTERP, ltstr> whitelister_map; | |
55 typedef list<DELAYWHITEP> delay_whitelist; | |
54 | 56 |
55 class SMTP { | 57 class SMTP { |
56 static const int maxlen = 1000; | 58 static const int maxlen = 1000; |
57 static const int qlen = 20; | 59 static const int qlen = 20; |
58 int fd; | 60 int fd; |
313 dnsblp_list& get_dnsbl_list(); | 315 dnsblp_list& get_dnsbl_list(); |
314 dnswlp_list& get_dnswl_list(); | 316 dnswlp_list& get_dnswl_list(); |
315 | 317 |
316 void log(const char *queueid, const char *msg, const char *v); | 318 void log(const char *queueid, const char *msg, const char *v); |
317 bool in_signing_set(const char *s, const char *signers); | 319 bool in_signing_set(const char *s, const char *signers); |
320 bool resolve_spf(const char *from, uint32_t ip, mlfiPriv *priv, int level = 0); | |
318 const char *acceptable_content(recorder &memory, int score, int bulk, const char *queueid, string_set &signers, const char *from, mlfiPriv *priv, string& msg); | 321 const char *acceptable_content(recorder &memory, int score, int bulk, const char *queueid, string_set &signers, const char *from, mlfiPriv *priv, string& msg); |
319 bool ignore_host(const char *host); | 322 bool ignore_host(const char *host); |
320 | 323 |
321 void dump(bool isdefault, bool &spamass, int level = 0); | 324 void dump(bool isdefault, bool &spamass, int level = 0); |
322 }; | 325 }; |