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@
-/* $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>
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 */