postfix catchall user not found in virtual alias table

Solution 1:

You can test the outcome with postmap -q "[email protected]" pcre:/etc/postfix/virtual. It should return catchall. What may happen here is that the /.*/ catchall also includes the catchall@localhost, making it to loop back to itself and eventually not resolved to any real user.

If you only have a certain domain and its subdomains, it would be more safe to use:

/@((\w[\w\-]*)\.)+example\.com/ catchall

Then, handle the localhost with $local_transport mail delivery transport using

mydestination = localhost

Now, your catchall@localhost may be a real local user or an alias defined in /etc/aliases.