summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/greylist.c4
-rw-r--r--tools/hi-q.c22
-rw-r--r--tools/makefile3
3 files changed, 20 insertions, 9 deletions
diff --git a/tools/greylist.c b/tools/greylist.c
index 95a4f0b..063c3d0 100644
--- a/tools/greylist.c
+++ b/tools/greylist.c
@@ -68,6 +68,10 @@ int prefix(const string shorter, const string longer){
void exeunt(const int sts){
if (sts == ex_good) exit(sts);
+#ifndef PENALIZE_SPAMMERS
+ if (sts == ex_penaltybox) exit(sts);
+#endif
+
const char* foo = getenv("HI_Q_GROUP");
if (!foo) exit(sts);
diff --git a/tools/hi-q.c b/tools/hi-q.c
index 6aaf302..8766b08 100644
--- a/tools/hi-q.c
+++ b/tools/hi-q.c
@@ -158,7 +158,7 @@ int fork_and_wait(const jobber job){
int sts = WEXITSTATUS(kidstatus);
if (sts != ex_good && sts != ex_spam) {
cerr << "hi-q: job " << prog[0]
- << " unexpectedly returns status: " << sts
+ << " unexpectedly returns status: " << sts
<< endl;
exit(sts);
}
@@ -179,7 +179,7 @@ int fork_and_wait(const jobber job){
int fork_and_wait(vector<jobber> post){
for(vector<jobber>::const_iterator foo = post.begin();
foo != post.end(); foo++) {
- int rslt = fork_and_wait(*foo);
+ int rslt = fork_and_wait(*foo);
if (rslt) return rslt;
}
return 0;
@@ -590,7 +590,7 @@ bar
// do not decrement the "alive" counter
// since that only applies to non-special kids
if (WIFEXITED(kidstatus)) {
- cerr << "hi-q: special kid exited early, status "
+ cerr << "hi-q: special kid exited early, status "
<< WEXITSTATUS(kidstatus)
<< " with " << alive << " kids still alive"
<< endl;
@@ -599,10 +599,10 @@ bar
int sig = WTERMSIG(kidstatus);
if (sig == SIGUSR1) {/* normal, no logging required */}
else {
- cerr << "hi-q: special kid killed by signal "
+ cerr << "hi-q: special kid killed by signal "
<< sig << endl;
// this is not normal
- return(ex_syserr);
+ return(ex_syserr);
}
} else {
/* paused, not dead */
@@ -612,7 +612,13 @@ bar
// here if somekid is not the special kid
if (WIFEXITED(kidstatus)) {
alive--;
- if (WEXITSTATUS(kidstatus)) {
+ int sts = WEXITSTATUS(kidstatus);
+#ifndef PENALIZE_SPAMMERS
+ // ignore penalties for the moment
+ // to see whether there are any false positives
+ if (sts == ex_penaltybox) sts = ex_good;
+#endif
+ if (sts) {
argbest_blame = somekid;
best_blame = kidstatus;
break;
@@ -694,7 +700,7 @@ bar
if (WIFEXITED(kidstatus)) {
int sts = WEXITSTATUS(kidstatus);
cerr << progid
- << " says: qq program"
+ << " says: qq program"
<< " i.e. " << basename(filter[nkids-1].cmd[0])
<< "[" << kidpid[nkids-1] << "]"
<< " returned status " << sts
@@ -702,7 +708,7 @@ bar
return sts;
} else if (WIFSIGNALED(kidstatus)) {
cerr << progid
- << " says: qq program"
+ << " says: qq program"
<< " i.e. " << basename(filter[nkids-1].cmd[0])
<< "[" << kidpid[nkids-1] << "]"
<< " was killed by signal " << WTERMSIG(kidstatus)
diff --git a/tools/makefile b/tools/makefile
index 6fa9636..9059a2f 100644
--- a/tools/makefile
+++ b/tools/makefile
@@ -49,7 +49,8 @@ todo:
... also provide a way for certain recipients to bypass some checks \
... both will require major restructuring, "cat" process \
... IPv6 reverse-DNS recors \
- .....
+ ... "clean up bad DNS reports nnnn --> () ==> ()" \
+ .....
ALWAYS:
@echo ...