From 159a3f448ad2caf9468921a4387c2dbafe09c3a3 Mon Sep 17 00:00:00 2001 From: John Denker Date: Tue, 31 Jul 2012 18:08:21 -0700 Subject: bring sepofra over from ~/hack/ --- tools/sepofra.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 tools/sepofra.h (limited to 'tools/sepofra.h') diff --git a/tools/sepofra.h b/tools/sepofra.h new file mode 100644 index 0000000..89719fb --- /dev/null +++ b/tools/sepofra.h @@ -0,0 +1,49 @@ +#include +#include +# include /* inet_ functions / structs */ +# include /* inet_ functions / structs */ +# include /* in_addr struct */ + +#ifdef __cplusplus +extern "C" { +# include "spf2/spf.h" +} +#else +# include "spf2/spf.h" +#endif + +#include +#include "bad_thing.h" + +class sepofra{ +public: + SPF_result_t result; + std::list authorities; + std::string ip; + std::string mailfrom; + SPF_request_t* spf_request; + SPF_response_t* spf_response; + + sepofra() + : result(SPF_RESULT_INVALID), + spf_request(NULL), + spf_response(NULL) + {} + void check( + const std::string opt_ip, + const std::string opt_helo, + const std::string opt_mailfrom, + const std::string opt_rcpt_to, + const int opt_debug); + + std::string explain() const; + SPF_result_t check1( + const std::string host, + const std::string msg, + const int debug); +}; + + +void dumpit(const int opt_debug, + SPF_response_t* spf_response, + const char* msg); -- cgit v1.2.3