#include #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" typedef std::map MSR; class sepofra{ public: SPF_result_t result; std::list authorities; MSR seen; std::string ip; std::string mailfrom; std::string helo; 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);