From c9652f33e6a4c1769cb9c54a54f2a6bd78e5f434 Mon Sep 17 00:00:00 2001 From: John Denker Date: Tue, 31 Jul 2012 13:16:58 -0700 Subject: Document some of the logic --- tools/ltgrey.c | 2 -- tools/skrewt.c | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) (limited to 'tools') 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 badnews; if (subject.find("-please-bounce-this-") != string::npos) { -- cgit v1.2.3