summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
diff options
context:
space:
mode:
authorOmar Polo <op@cvs.openbsd.org>2023-11-16 10:23:22 +0000
committerOmar Polo <op@cvs.openbsd.org>2023-11-16 10:23:22 +0000
commit8127e7b6160945a16d9ef70d3ec5b22be75faa49 (patch)
tree484895c2e4e53b63fe4cc2058136c051b1d74218 /usr.sbin/smtpd
parent293230b32e5c7c2d1da93fd7c502e5cc65341637 (diff)
consider an MX of "localhost" as it were a "Null MX"
diff from Philipp (philipp+openbsd [at] bureaucracy [dot] de), thanks! ok sthen@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r--usr.sbin/smtpd/dns.c5
1 files changed, 3 insertions, 2 deletions
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 <gilles@poolp.org>
@@ -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;
}