summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Denker <jsd@av8n.com>2014-01-15 16:45:15 -0800
committerJohn Denker <jsd@av8n.com>2014-01-15 16:45:15 -0800
commit97f3e615e5d634ca0b762193c0e87017d41584fd (patch)
tree7b1f2662e70f203f3963df52d0bf12e9d4ce8097
parente3dd7758443ccec1ec5fa1f1a783205032d81082 (diff)
minor improvements to progress-messages
-rw-r--r--tools/libskrewt.c22
-rw-r--r--tools/libskrewt.h1
2 files changed, 18 insertions, 5 deletions
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 <hmperks@gmail.com>
1 <btv1==55494f7d7e0==matt.fisher@email.stvincent.edu>
1 <arcor.de>
+ ? <bbtel.com>
#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 + "'");
}
diff --git a/tools/libskrewt.h b/tools/libskrewt.h
index af488f2..00a8d90 100644
--- a/tools/libskrewt.h
+++ b/tools/libskrewt.h
@@ -3,6 +3,7 @@
#include <iostream>
#include "sepofra.h"
#include "qq_exit_codes.h" // a bit of a kludge
+
extern std::string progid;
#define test_state_macro \