From a26e789121448d095227583f7a29ae2deac88a33 Mon Sep 17 00:00:00 2001 From: John Denker Date: Fri, 23 Nov 2012 01:06:10 -0800 Subject: mid debug --- tools/libskrewt.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'tools/libskrewt.h') diff --git a/tools/libskrewt.h b/tools/libskrewt.h index cfbbb79..5ae6ece 100644 --- a/tools/libskrewt.h +++ b/tools/libskrewt.h @@ -5,6 +5,14 @@ #include "qq_exit_codes.h" // a bit of a kludge extern std::string progid; +class xstr { +public: + int err; + std::string str; + xstr() : err(1), str("") {} + xstr(const int foo, const std::string bar) : err(foo), str(bar) {} +}; + class skrewt{ public: std::string received_from; // envelope HELO among other things @@ -12,6 +20,7 @@ public: std::string proximta_rDNS; std::string proximta_IP; std::string proximta_AuthUser; + SPF_result_t spf_result; std::string return_path; // envelope MAIL FROM std::string boundary; std::string to; @@ -20,7 +29,7 @@ public: std::string date; std::string message_id; std::string content_type; - std::string delivered_to; + std::list delivered_to; int msgsize; std::vector bigbuf; int saw_blank_line; @@ -32,15 +41,20 @@ public: // constructor skrewt() - : boundary("x-xx-x"), msgsize(0), saw_blank_line(0), recno(0), - maxsize(1000*1000), error_exit(0), mid_required(0) + : spf_result(SPF_RESULT_INVALID), + boundary("x-xx-x"), msgsize(0), saw_blank_line(0), recno(0), + maxsize(1000*1000), error_exit(0), mid_required(0), + lookahead(1, "") {} + xstr getRecord(std::istream& xin); + xstr getLine(std::istream& xin); int headers(std::istream& xin); int dump_headers(std::ostream& xout); int interstage(); int body(std::istream& xin, std::ostream& xout); int krunch_rfrom(); + xstr lookahead; }; void parse_content(const std::string type_spec_line, -- cgit v1.2.3