diff options
author | eric <eric@openbsd.org> | 2020-04-28 21:46:43 +0000 |
---|---|---|
committer | eric <eric@openbsd.org> | 2020-04-28 21:46:43 +0000 |
commit | c19e971e4714bc04ba92e432963572c367622d7e (patch) | |
tree | 515ab6ba1a4fbf48531c498ce78ac2f2b2e74987 /usr.sbin/smtpd | |
parent | Move legacy stack interfacing functions into tls13_legacy.c. (diff) | |
download | wireguard-openbsd-c19e971e4714bc04ba92e432963572c367622d7e.tar.xz wireguard-openbsd-c19e971e4714bc04ba92e432963572c367622d7e.zip |
In virtual alias context, do not try to match catchall entries for
usernames, but only for email addresses. fixes an issue where
usernames always expand to the @ wildcard if defined in the virtual
alias file.
discussed with Gilles Chehade
ok millert@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r-- | usr.sbin/smtpd/aliases.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/aliases.c b/usr.sbin/smtpd/aliases.c index 884f696365f..1c602e9f8b7 100644 --- a/usr.sbin/smtpd/aliases.c +++ b/usr.sbin/smtpd/aliases.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aliases.c,v 1.77 2018/12/28 12:47:28 eric Exp $ */ +/* $OpenBSD: aliases.c,v 1.78 2020/04/28 21:46:43 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -164,6 +164,10 @@ aliases_virtual_get(struct expand *expand, const struct mailaddr *maddr) if (ret) goto expand; + /* Do not try catch-all entries if there is no domain */ + if (domain[0] == '\0') + return 0; + if (!bsnprintf(buf, sizeof(buf), "@%s", domain)) return 0; /* Failed ? We lookup for catch all for virtual domain */ |