summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJohn Denker <jsd@av8n.com>2012-07-31 13:16:58 -0700
committerJohn Denker <jsd@av8n.com>2012-07-31 14:34:36 -0700
commitc9652f33e6a4c1769cb9c54a54f2a6bd78e5f434 (patch)
tree36ec5fe68b20256eba435ff523c162d650c73844 /tools
parent158def7ed5c5100456d05150670cfebc3bc2ddd1 (diff)
Document some of the logic
Diffstat (limited to 'tools')
-rw-r--r--tools/ltgrey.c2
-rw-r--r--tools/skrewt.c23
2 files changed, 23 insertions, 2 deletions
diff --git a/tools/ltgrey.c b/tools/ltgrey.c
index 26d0f64..bc41a99 100644
--- a/tools/ltgrey.c
+++ b/tools/ltgrey.c
@@ -12,8 +12,6 @@ string progname;
#define exeunt exit
int main(int _argc, char** _argv){
- std::string hostname;
- std::string ipname;
mypid = getpid();
int argc(_argc);
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) {