summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/greylist.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/tools/greylist.c b/tools/greylist.c
index c5c891f..d76ba08 100644
--- a/tools/greylist.c
+++ b/tools/greylist.c
@@ -264,19 +264,20 @@ int main(int _argc, char** _argv){
}
int sts = foo.doit(penalty);
+ if (sts == ex_syserr) return sts;
+ if (!check) return ex_good;
-// perform some extra checks.
+// check mode ... perform some extra checks.
// Probably a better design would be to
// a) make more thorough DNS checks, and
// b) move all the DNS checking to a separate module
- if (check){
- char* hostvar = getenv("TCPREMOTEHOST");
- if (!hostvar) {
- cerr << foo.progid
- << " from " << foo.ipbase
- << " ... TCPREMOTEHOST not set???" << endl;
- exeunt(ex_spam);
- }
+
+ char* hostvar = getenv("TCPREMOTEHOST");
+ if (!hostvar) {
+ cerr << foo.progid
+ << " from " << foo.ipbase
+ << " ... TCPREMOTEHOST not set???" << endl;
+ exeunt(ex_spam);
}
exeunt(sts);
}