Mercurial > dnsbl
diff 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 |
line wrap: on
line diff
--- a/src/context.h Tue Feb 28 17:02:07 2017 -0800 +++ b/src/context.h Mon Mar 06 12:21:05 2017 -0800 @@ -29,6 +29,8 @@ typedef set<int> int_set; typedef set<int32_t> int32_t_set; typedef int32_t_set * int32_t_set_p; +typedef set<uint32_t> uint32_t_set; +typedef uint32_t_set * uint32_t_set_p; typedef list<SMTP *> smtp_list; typedef DKIM * DKIMP; typedef DNSBL * DNSBLP; @@ -44,9 +46,9 @@ typedef CONTEXT * CONTEXTP; typedef list<CONTEXTP> context_list; typedef map<const char *, CONTEXTP, ltstr> context_map; -typedef map<const char *, int32_t, ltstr> ns_mapper; // name to ipv4 address +typedef map<const char *, uint32_t, ltstr> ns_mapper; // name to ipv4 address typedef map<const char *, int, ltstr> rates; -typedef map<const char *, int32_t_set_p, ltstr> auth_addresses; +typedef map<const char *, uint32_t_set_p, ltstr> auth_addresses; typedef map<const char *, time_t, ltstr> autowhite_sent; typedef map<const char *, VERIFYP, ltstr> verify_map; typedef map<const char *, WHITELISTERP, ltstr> whitelister_map; @@ -315,6 +317,7 @@ void log(const char *queueid, const char *msg, const char *v); bool in_signing_set(const char *s, const char *signers); + bool resolve_spf(const char *from, uint32_t ip, mlfiPriv *priv, int level = 0); const char *acceptable_content(recorder &memory, int score, int bulk, const char *queueid, string_set &signers, const char *from, mlfiPriv *priv, string& msg); bool ignore_host(const char *host);