From: gilles Date: Sun, 2 Sep 2018 21:06:44 +0000 (+0000) Subject: mailaddr matching was working for the exact and domain match, but not when X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6947999879a295bb2650b0a95a65544dcb4ef495;p=openbsd mailaddr matching was working for the exact and domain match, but not when only a user-part was supplied. ok millert@ and eric@ --- 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]) {