commit 05f20f1d7b49e25f045edfe43053c3f66bfa611d from: Martijn van Duren date: Thu Mar 28 15:29:24 2019 UTC remove onfailure and retries. Proper mailers should retry later. commit - 9d22f50090e93dc156fe36e8c602e99624762dfd commit + 05f20f1d7b49e25f045edfe43053c3f66bfa611d blob - b3485b1bfa8478c7739de10ae713686503cd2173 blob + fa04b86564ef9d134a26de6cbaf62c93d40ad6a0 --- main.c +++ main.c @@ -12,8 +12,6 @@ static char **blacklists = NULL; static size_t nblacklists = 0; -int retries = 0; -int reject_onfailure = 0; void usage(void); enum filter_decision dnsbl_connect(char *, int, time_t, char *, char *, @@ -45,13 +43,6 @@ main(int argc, char *argv[]) err(1, NULL); nblacklists++; break; - case 'f': - reject_onfailure = 1; - case 'r': - if ((retries = strtonum(optarg, 0, 10, &errstr)) == 0 && - errstr != NULL) - errx(1, "retries %s", errstr); - break; default: usage(); } @@ -109,24 +100,18 @@ dnsbl_connect(char *type, int version, time_t tm, char } else errx(1, "Invalid address family received"); - for (try = -1; try < retries; try++) { - if ((hent = gethostbyname(query)) == NULL) { - if (h_errno == HOST_NOT_FOUND) - break; - if (h_errno != TRY_AGAIN) { - if (!reject_onfailure) - break; - else - smtp_filter_disconnect(reqid, - token, - "Blacklist check failed"); - return FILTER_DISCONNECT; - } - } else { + if ((hent = gethostbyname(query)) == NULL) { + if (h_errno == HOST_NOT_FOUND) + break; + if (h_errno != TRY_AGAIN) { smtp_filter_disconnect(reqid, token, - "Listed at %s", blacklists[i]); + "Blacklist check failed"); return FILTER_DISCONNECT; } + } else { + smtp_filter_disconnect(reqid, token, + "Listed at %s", blacklists[i]); + return FILTER_DISCONNECT; } } return FILTER_PROCEED;