> On Sep 19, 2017, at 8:39 PM, Andreas Thienemann <[email protected]> wrote:
>
> That would work. A bit of a hack though and I think it would only work for
> virtual aliases with one level of redirection but not for something like
> [email protected] -> [email protected] -> spam-mails.
Some SQL implementations support recursive CTEs, or you can periodically
construct a table that holds the recursive closure of such aliases.
Do be careful though to only apply the rule to 1-to-1 aliases, and not
1 to many groups, just in case a group contains a member that maps to
such an address (that's likely a misconfiguration, but could happen).
In some schemas groups that expand to multiple addresses are stored
differently than users that might have an email redirect.
--
Viktor.