summaryrefslogtreecommitdiff
path: root/tools/skrewt.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/skrewt.c')
-rw-r--r--tools/skrewt.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/skrewt.c b/tools/skrewt.c
index 8c9beba..4d69862 100644
--- a/tools/skrewt.c
+++ b/tools/skrewt.c
@@ -287,6 +287,29 @@ int skrewt::interstage(){
if (saw_blank_line) {/* ignore */}
cerr << progid <<" Mid '" << message_id << "'" << endl;
+// The logic here is: In order:
+// 1) If whitelisted, accept. No greylisting, no spam-checking.
+// 2) If blacklisted, reject. No greylisting, no spam-checking.
+// 3) If good reputation, spam-check it and send it on its way.
+// 4) If no reputation, greylist.
+// 5) If bad reputation, ????
+
+// 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.
+// 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
+// to the sender-IP.
+
+// Expanding item 4 to the next level of detail:
+// 4a) If the greylisting database says this message is ripe
+// spam-check it. If it's OK, use it to count toward reputation.
+// 4b) If it is previously unseen or too old, start greylisting
+// timer from scratch. Reject with temporary error.
+// 4c) If it is in the "green" state, let the timer
+// continue from where it is. Reject with temporary error.
+
list<string> badnews;
if (subject.find("-please-bounce-this-") != string::npos) {