On Thu, 2 Apr 2020 15:57:17 +0800
Stephan Chedlivili <[email protected]> wrote:
> Is there a way to achieve that? And more generally, is that a good
> idea?
You could have a list with valid receivers and redirect the rest to your
user X with a catchall rule. Something like this (untested, partial):
table aliases file:/etc/mail/aliases
table valid_receivers file:/etc/mail/valid_receivers
action "local_mail" mbox alias <aliases>
action "catchall" mbox virtual { "@" => userx } user userx
match from any for domain "example.org" rcpt-to <valid_receivers> action
"local_mail"
match from any for domain "example.org" action "catchall"
Generally, this is a mediocre idea, since you'll mostly scoop up a lot
of spam.
> Thank you,
>
> -Stephan
Kind regard,
Thomas