# HG changeset patch # User Carl Byington # Date 1613843189 28800 # Node ID 5209e92b48855bbef2436b5371fdcdcfa177c5d3 # Parent 86a61ed64baf682e2420311f9e3da18ff2b84ca5 opendkim headers changed, pass smtp verify 4xy codes back to sender diff -r 86a61ed64baf -r 5209e92b4885 ChangeLog --- a/ChangeLog Wed Dec 16 13:40:59 2020 -0800 +++ b/ChangeLog Sat Feb 20 09:46:29 2021 -0800 @@ -1,3 +1,7 @@ +6.78 2021-02-20 + Opendkim headers have changed on centos 8. Pass smtp + verify temp fail 4xy codes back to the sending system. + 6.77 2020-12-16 allow checking names without A records on uribl lists. improve extraction of fake TLDs from our RPZ zone so diff -r 86a61ed64baf -r 5209e92b4885 NEWS --- a/NEWS Wed Dec 16 13:40:59 2020 -0800 +++ b/NEWS Sat Feb 20 09:46:29 2021 -0800 @@ -1,3 +1,4 @@ +6.78 2021-02-20 opendkim headers changed, pass smtp verify 4xy codes back to sender 6.77 2020-12-16 allow checking names without A records on uribl lists. 6.76 2019-04-25 SA needs original rfc5321 envelope from to do proper spf checking. 6.75 2019-03-10 change dkim_from syntax to allow "signer1,signer2;spf data" diff -r 86a61ed64baf -r 5209e92b4885 configure.in --- a/configure.in Wed Dec 16 13:40:59 2020 -0800 +++ b/configure.in Sat Feb 20 09:46:29 2021 -0800 @@ -1,6 +1,6 @@ AC_PREREQ(2.59) -AC_INIT(dnsbl,6.77,carl@five-ten-sg.com) +AC_INIT(dnsbl,6.78,carl@five-ten-sg.com) AC_CONFIG_SRCDIR([config.h.in]) AC_CONFIG_HEADER([config.h]) AC_CONFIG_MACRO_DIR([m4]) diff -r 86a61ed64baf -r 5209e92b4885 dnsbl.spec.in --- a/dnsbl.spec.in Wed Dec 16 13:40:59 2020 -0800 +++ b/dnsbl.spec.in Sat Feb 20 09:46:29 2021 -0800 @@ -151,7 +151,11 @@ %changelog -* Tue Dec 16 2020 Carl Byington - 6.77-1 +* Sat Feb 20 2021 Carl Byington - 6.78-1 +- Opendkim headers have changed on centos 8. Pass smtp + verify temp fail 4xy codes back to the sending system. + +* Wed Dec 16 2020 Carl Byington - 6.77-1 - allow checking names without A records on uribl lists. - improve extraction of fake TLDs from our RPZ zone so that names under those TLDs may be added to uribl lists @@ -397,7 +401,7 @@ * Sun Dec 18 2005 Carl Byington - 5.11 - use autoconf and http://www.fedora.us/docs/rpm-packaging-guidelines.html -* Tue Jan 03 2005 Carl Byington - 4.0 +* Mon Jan 03 2005 Carl Byington - 4.0 - added hosts-ignore conf file - see RELEASE_NOTES diff -r 86a61ed64baf -r 5209e92b4885 src/context.cpp --- a/src/context.cpp Wed Dec 16 13:40:59 2020 -0800 +++ b/src/context.cpp Sat Feb 20 09:46:29 2021 -0800 @@ -401,7 +401,7 @@ } -bool VERIFY::ok(const char *queueid, const char *from, const char *to) { +int VERIFY::ok(const char *queueid, const char *from, const char *to) { if (host == token_myhostname) return true; SMTP *conn = get_connection(queueid); if (!conn) { @@ -413,12 +413,12 @@ conn->log("verify::ok(%d) from sees %d", rc); if (rc != 250) { put_connection(conn); - return (rc >= 500) ? false : true; + return rc; } rc = conn->rcpt(to); conn->log("verify::ok(%d) rcpt sees %d", rc); put_connection(conn); - return (rc >= 500) ? false : true; + return rc; } diff -r 86a61ed64baf -r 5209e92b4885 src/context.h --- a/src/context.h Wed Dec 16 13:40:59 2020 -0800 +++ b/src/context.h Sat Feb 20 09:46:29 2021 -0800 @@ -1,6 +1,6 @@ /* -Copyright (c) 2007 Carl Byington - 510 Software Group, released under +Copyright (c) 2007, 2021 Carl Byington - 510 Software Group, released under the GPL version 3 or any later version at your choice available at http://www.gnu.org/licenses/gpl-3.0.txt @@ -108,7 +108,7 @@ void closer(); // if the oldest socket is ancient, close it SMTP *get_connection(const char *queueid); void put_connection(SMTP *conn); - bool ok(const char *queueid, const char *from, const char *to); + int ok(const char *queueid, const char *from, const char *to); }; class WHITELISTER { diff -r 86a61ed64baf -r 5209e92b4885 src/dccifd.cpp --- a/src/dccifd.cpp Wed Dec 16 13:40:59 2020 -0800 +++ b/src/dccifd.cpp Sat Feb 20 09:46:29 2021 -0800 @@ -1,6 +1,6 @@ /* -Copyright (c) 2007 Carl Byington - 510 Software Group, released under +Copyright (c) 2007, 2021 Carl Byington - 510 Software Group, released under the GPL version 3 or any later version at your choice available at http://www.gnu.org/licenses/gpl-3.0.txt diff -r 86a61ed64baf -r 5209e92b4885 src/dccifd.h --- a/src/dccifd.h Wed Dec 16 13:40:59 2020 -0800 +++ b/src/dccifd.h Sat Feb 20 09:46:29 2021 -0800 @@ -1,6 +1,6 @@ /* -Copyright (c) 2007 Carl Byington - 510 Software Group, released under +Copyright (c) 2007, 2021 Carl Byington - 510 Software Group, released under the GPL version 3 or any later version at your choice available at http://www.gnu.org/licenses/gpl-3.0.txt diff -r 86a61ed64baf -r 5209e92b4885 src/dnsbl.cpp --- a/src/dnsbl.cpp Wed Dec 16 13:40:59 2020 -0800 +++ b/src/dnsbl.cpp Sat Feb 20 09:46:29 2021 -0800 @@ -1491,12 +1491,16 @@ if (ver) { // try to verify the original from/to pair of addresses even if it might be explicitly whitelisted const char *loto = to_lower_string(rcptaddr, false); - bool rc = ver->ok(priv.queueid, priv.origaddr, loto); + int rc = ver->ok(priv.queueid, priv.origaddr, loto); free((void*)loto); - if (!rc) { + if (rc >= 500) { smfi_setreply(ctx, (char*)"550", (char*)"5.7.1", (char*)"no such user"); return SMFIS_REJECT; } + if (rc >= 400) { + smfi_setreply(ctx, (char*)"452", (char*)"4.2.1", (char*)"temporary greylist embargoed"); + return SMFIS_REJECT; + } } if (!priv.authenticated && dc.default_context->is_unauthenticated_limited(priv.mailaddr)) { @@ -2059,7 +2063,7 @@ } // setup dkim results signature detection - if (regcomp(&dkim_r_pattern, "\\sdkim=pass\\s*.[0-9]*-bit key.\\s*header.d=([^ ]+)\\s", REG_ICASE | REG_EXTENDED)) { + if (regcomp(&dkim_r_pattern, "\\sdkim=pass\\s*.[0-9]*-bit key.*\\s*header.d=([^ ]+)\\s", REG_ICASE | REG_EXTENDED)) { printf("cannot compile regex pattern to find dkim results signatures\n"); exit(3); } diff -r 86a61ed64baf -r 5209e92b4885 src/dnsbl.h --- a/src/dnsbl.h Wed Dec 16 13:40:59 2020 -0800 +++ b/src/dnsbl.h Sat Feb 20 09:46:29 2021 -0800 @@ -1,6 +1,6 @@ /* -Copyright (c) 2007 Carl Byington - 510 Software Group, released under +Copyright (c) 2007, 2021 Carl Byington - 510 Software Group, released under the GPL version 3 or any later version at your choice available at http://www.gnu.org/licenses/gpl-3.0.txt diff -r 86a61ed64baf -r 5209e92b4885 src/includes.h --- a/src/includes.h Wed Dec 16 13:40:59 2020 -0800 +++ b/src/includes.h Sat Feb 20 09:46:29 2021 -0800 @@ -1,6 +1,6 @@ /* -Copyright (c) 2007 Carl Byington - 510 Software Group, released under +Copyright (c) 2007, 2021 Carl Byington - 510 Software Group, released under the GPL version 3 or any later version at your choice available at http://www.gnu.org/licenses/gpl-3.0.txt diff -r 86a61ed64baf -r 5209e92b4885 src/scanner.cpp --- a/src/scanner.cpp Wed Dec 16 13:40:59 2020 -0800 +++ b/src/scanner.cpp Sat Feb 20 09:46:29 2021 -0800 @@ -1,6 +1,6 @@ /* -Copyright (c) 2007 Carl Byington - 510 Software Group, released under +Copyright (c) 2007, 2021 Carl Byington - 510 Software Group, released under the GPL version 3 or any later version at your choice available at http://www.gnu.org/licenses/gpl-3.0.txt diff -r 86a61ed64baf -r 5209e92b4885 src/scanner.h --- a/src/scanner.h Wed Dec 16 13:40:59 2020 -0800 +++ b/src/scanner.h Sat Feb 20 09:46:29 2021 -0800 @@ -1,6 +1,6 @@ /* -Copyright (c) 2007 Carl Byington - 510 Software Group, released under +Copyright (c) 2007, 2021 Carl Byington - 510 Software Group, released under the GPL version 3 or any later version at your choice available at http://www.gnu.org/licenses/gpl-3.0.txt diff -r 86a61ed64baf -r 5209e92b4885 src/spamass.cpp.in --- a/src/spamass.cpp.in Wed Dec 16 13:40:59 2020 -0800 +++ b/src/spamass.cpp.in Sat Feb 20 09:46:29 2021 -0800 @@ -1,6 +1,6 @@ /* -Copyright (c) 2007 Carl Byington - 510 Software Group, released under +Copyright (c) 2007, 2021 Carl Byington - 510 Software Group, released under the GPL version 3 or any later version at your choice available at http://www.gnu.org/licenses/gpl-3.0.txt diff -r 86a61ed64baf -r 5209e92b4885 src/spamass.h --- a/src/spamass.h Wed Dec 16 13:40:59 2020 -0800 +++ b/src/spamass.h Sat Feb 20 09:46:29 2021 -0800 @@ -1,6 +1,6 @@ /* -Copyright (c) 2007 Carl Byington - 510 Software Group, released under +Copyright (c) 2007, 2021 Carl Byington - 510 Software Group, released under the GPL version 3 or any later version at your choice available at http://www.gnu.org/licenses/gpl-3.0.txt diff -r 86a61ed64baf -r 5209e92b4885 src/test.cpp --- a/src/test.cpp Wed Dec 16 13:40:59 2020 -0800 +++ b/src/test.cpp Sat Feb 20 09:46:29 2021 -0800 @@ -1,6 +1,6 @@ /* -Copyright (c) 2007 Carl Byington - 510 Software Group, released under +Copyright (c) 2007, 2021 Carl Byington - 510 Software Group, released under the GPL version 3 or any later version at your choice available at http://www.gnu.org/licenses/gpl-3.0.txt diff -r 86a61ed64baf -r 5209e92b4885 src/tokenizer.cpp --- a/src/tokenizer.cpp Wed Dec 16 13:40:59 2020 -0800 +++ b/src/tokenizer.cpp Sat Feb 20 09:46:29 2021 -0800 @@ -1,6 +1,6 @@ /* -Copyright (c) 2007 Carl Byington - 510 Software Group, released under +Copyright (c) 2007, 2021 Carl Byington - 510 Software Group, released under the GPL version 3 or any later version at your choice available at http://www.gnu.org/licenses/gpl-3.0.txt diff -r 86a61ed64baf -r 5209e92b4885 src/tokenizer.h --- a/src/tokenizer.h Wed Dec 16 13:40:59 2020 -0800 +++ b/src/tokenizer.h Sat Feb 20 09:46:29 2021 -0800 @@ -1,6 +1,6 @@ /* -Copyright (c) 2007 Carl Byington - 510 Software Group, released under +Copyright (c) 2007, 2021 Carl Byington - 510 Software Group, released under the GPL version 3 or any later version at your choice available at http://www.gnu.org/licenses/gpl-3.0.txt