diff options
author | John Denker <jsd@av8n.com> | 2012-11-23 01:06:10 -0800 |
---|---|---|
committer | John Denker <jsd@av8n.com> | 2012-11-23 01:06:10 -0800 |
commit | a26e789121448d095227583f7a29ae2deac88a33 (patch) | |
tree | dd1f63baf7e440fefd2e9ef905b4228f7838a12c /tools/libskrewt.h | |
parent | 9d13c14fe5ad5dff32c09b1c5c13af9518b3e727 (diff) |
mid debug
Diffstat (limited to 'tools/libskrewt.h')
-rw-r--r-- | tools/libskrewt.h | 20 |
1 files changed, 17 insertions, 3 deletions
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<std::string> delivered_to; int msgsize; std::vector<std::string> 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, |