summaryrefslogtreecommitdiff
path: root/tools/greylist.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/greylist.c')
-rw-r--r--tools/greylist.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/tools/greylist.c b/tools/greylist.c
index 863a2fe..95a4f0b 100644
--- a/tools/greylist.c
+++ b/tools/greylist.c
@@ -436,6 +436,8 @@ int whatsit::check_dns(){
struct addrinfo *res;
addrinfo hints;
int error;
+ int ex_dnserr(ex_syserr);
+ ex_dnserr = 0; // temporarily just a warning
/* resolve the domain name into a list of addresses */
memset(&hints, 0, sizeof(struct addrinfo));
@@ -448,11 +450,11 @@ int whatsit::check_dns(){
if (error) {
cerr << "error in getaddrinfo for " << ipvar
<< " : " << gai_strerror(error) << endl;
- return ex_syserr;
+ return ex_dnserr;
}
if (!ipresult) {
cerr << "should never happen (addr with no addrs?)" << endl;
- return ex_syserr;
+ return ex_dnserr;
}
VUx ipAddr = parse_sockaddr(ipresult->ai_addr);
@@ -460,7 +462,7 @@ int whatsit::check_dns(){
if (error) {
cerr << "error in getaddrinfo for " << hostvar
<< " : " << gai_strerror(error) << endl;
- return ex_syserr;
+ return ex_dnserr;
}
// loop over all returned results and check for a match.
@@ -473,19 +475,15 @@ int whatsit::check_dns(){
goto done;
}
}
- cerr << "(warning) DNS inconsistency: "
- << ipAddr.str() << " does not match";
+ if (!ex_dnserr) cerr << "(warning) ";
+ cerr << "DNS inconsistency: "
+ << ipAddr.str() << " --> "
+ << hostvar << " ==>";
for (res = result; res != NULL; res = res->ai_next){
cerr << " " << parse_sockaddr(res->ai_addr).str();
}
cerr << endl;
-#if 1
- // temporary ... just a warning
- return 0;
-#else
- return ex_spam;
-#endif
-
+ return ex_dnserr;
done:
return 0;