From 97f3e615e5d634ca0b762193c0e87017d41584fd Mon Sep 17 00:00:00 2001 From: John Denker Date: Wed, 15 Jan 2014 16:45:15 -0800 Subject: minor improvements to progress-messages --- tools/libskrewt.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'tools/libskrewt.c') diff --git a/tools/libskrewt.c b/tools/libskrewt.c index 05fb2cf..163c3b1 100644 --- a/tools/libskrewt.c +++ b/tools/libskrewt.c @@ -360,12 +360,12 @@ int skrewt::interstage(){ } cerr << progid << " === rDNS: " << proximta_rDNS.name - << " " << decode_test_state[proximta_rDNS.spf] - << " " << decode_test_state[proximta_rDNS.map2ip] + << " spf: " << decode_test_state[proximta_rDNS.spf] + << " map2ip: " << decode_test_state[proximta_rDNS.map2ip] << endl; cerr << progid << " === HELO: " << proximta_HELO.name - << " " << decode_test_state[proximta_HELO.spf] - << " " << decode_test_state[proximta_HELO.map2ip] + << " spf: " << decode_test_state[proximta_HELO.spf] + << " map2ip: " << decode_test_state[proximta_HELO.map2ip] << endl; cerr << progid << " === IP: " << proximta_IP << endl; cerr << progid << " === Mid '" << message_id << "'" << endl; @@ -382,6 +382,8 @@ int skrewt::interstage(){ // Expanding item 3 to the next level of detail: // 3a:: If some domain vouches for this sender-IP via SPF, // then the reputation is bound to the domain. +// 3b:: If some domain repudiates this sender-IP vie SPF, +// reject immediately. // 3c:: If some domain vouches for the message vie DKIM, // then the reputation is bound to the domain. // 3d:: If no SPF or DKIM, then the reputation attaches @@ -453,6 +455,7 @@ int skrewt::interstage(){ 1 1 1 + ? #endif #if 0 /* DKIM users */ @@ -497,7 +500,16 @@ int skrewt::interstage(){ badnews.push_back("no date"); } - if (received_from.find("@aexp.com") != string::npos) { + if (proximta_HELO.spf == fail){ + badnews.push_back("repudiated by spf (HELO)"); + } + + if (proximta_rDNS.spf == fail){ + badnews.push_back("repudiated by spf (rDNS)"); + } + + cerr << "check: return_path: " << return_path.name << endl; + if (return_path.name.find("@aexp.com") != string::npos) { badnews.push_back("long-running phishing pest: '" + received_from + "'"); } -- cgit v1.2.3