On Dec 15, 2015, at 3:47 PM, Juerg Reimann <[email protected]> wrote:
>
> I need a catch-all configuration for a domain, but only for otherwise
> non-existent addresses. How could I do that? If I configure catch-all as
> described in VIRTUAL_README, every mail to that domain is forwarded, even
> those for real users...
If your virtual users are in sql I a simple ordered and limited query could
work.
# Untested:
select
t1.*,
case when t1.account = “ALL” then 1 else 0 end as catchall
from users t1
where t1.account in (“%u”, “ALL”)
order by catchall asc
limit 1
—
Brad