From: op Date: Thu, 16 Nov 2023 10:23:21 +0000 (+0000) Subject: consider an MX of "localhost" as it were a "Null MX" X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=28e3f7cbb365cbcbefcfaeefd03bac1eb4a157f8;p=openbsd consider an MX of "localhost" as it were a "Null MX" diff from Philipp (philipp+openbsd [at] bureaucracy [dot] de), thanks! ok sthen@ --- diff --git a/usr.sbin/smtpd/dns.c b/usr.sbin/smtpd/dns.c index dc7987aa29c..b1b49ea7576 100644 --- a/usr.sbin/smtpd/dns.c +++ b/usr.sbin/smtpd/dns.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dns.c,v 1.91 2023/11/08 08:46:34 op Exp $ */ +/* $OpenBSD: dns.c,v 1.92 2023/11/16 10:23:21 op Exp $ */ /* * Copyright (c) 2008 Gilles Chehade @@ -263,7 +263,8 @@ dns_dispatch_mx(struct asr_result *ar, void *arg) print_dname(rr.rr.mx.exchange, buf, sizeof(buf)); buf[strlen(buf) - 1] = '\0'; - if (rr.rr.mx.preference == 0 && !strcmp(buf, "")) { + if ((rr.rr.mx.preference == 0 && !strcmp(buf, "")) || + !strcmp(buf, "localhost")) { nullmx = 1; continue; }