Did you happen to try putting the catch-all addresses at the TOP of the virtualusers hashmap file? Just a guess. It's been a long time since I've manually setup Postfix...
On Tue, Feb 2, 2021 at 6:53 PM david <da...@daku.org> wrote: > > Dear Gurus > > I'm having a problem configuring Postfix on Ubuntu server 20.04, to > perform as follows: > > I want to accept mail for several domains, let's say: d1.tld, > d2.tld, with 'd1.tld' being 'mydomain'. > > Mail for some specific destinations are supposed to be delivered > locally to designated accounts: > mail for a...@d1.tld goes to local account 'd1_a' > mail for b...@d1.tld goes to local account 'd1_b' > mail for anyone else at d1.tld goes to 'owner_d1' > mail for anyone at d2.tld goes to 'owner_d2' > > > To accomplish this, I set values in /etc/postfix/main.cf: > > mydomain = d1.tld > mydestination = localhost.$mydomain localhost $mydomain > virtual_alias_domains = d2.tld > virtual_alias_maps = hash:/etc/postfix/virtualusers > > The file /etc/aliases contains: > root: owner_d1 > > and the file /etc/postfix/virtualusers contains: > > a...@d1.tld d1_a > b...@d1.tld d1_b > @d1.tld owner_d1 > @d2.tld owner_d2 > > All four linux accounts exist. > > And my problem is that all mail for anyone d1.tld and d2.tld gets > delivered to owner_d1. > Can anyone advise me where to look for a solution? > > David >