summaryrefslogtreecommitdiff
path: root/tools/skrewt.c
diff options
context:
space:
mode:
authorJohn Denker <jsd@av8n.com>2012-07-31 20:16:58 (GMT)
committerJohn Denker <jsd@av8n.com>2012-07-31 21:34:36 (GMT)
commitc9652f33e6a4c1769cb9c54a54f2a6bd78e5f434 (patch)
tree36ec5fe68b20256eba435ff523c162d650c73844 /tools/skrewt.c
parent158def7ed5c5100456d05150670cfebc3bc2ddd1 (diff)
Document some of the logic
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) {