summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2018-09-02 21:06:45 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2018-09-02 21:06:45 +0000
commit052ac402da70998a4dd984c5e4360e3c092dec87 (patch)
treed9659a4cf10d4cc24013ad07fa7d89599078c48a /usr.sbin/smtpd
parent3a4b352e785a45d084a2435624d94892eb5c0a42 (diff)
mailaddr matching was working for the exact and domain match, but not when
only a user-part was supplied. ok millert@ and eric@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r--usr.sbin/smtpd/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/util.c b/usr.sbin/smtpd/util.c
index ab7689974f2..3637d4dfff7 100644
--- a/usr.sbin/smtpd/util.c
+++ b/usr.sbin/smtpd/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.136 2018/05/31 21:06:12 gilles Exp $ */
+/* $OpenBSD: util.c,v 1.137 2018/09/02 21:06:44 gilles Exp $ */
/*
* Copyright (c) 2000,2001 Markus Friedl. All rights reserved.
@@ -465,7 +465,7 @@ mailaddr_match(const struct mailaddr *maddr1, const struct mailaddr *maddr2)
if (m2.user[0] == '\0' && m2.domain[0] == '\0')
return 1;
- if (!hostname_match(m1.domain, m2.domain))
+ if (m2.domain[0] && !hostname_match(m1.domain, m2.domain))
return 0;
if (m2.user[0]) {