Hi Thomas,

Thank you for the tip. I tweaked it a little (I use lmtp with dovecot and
virtual user for delivery) and I managed to have this catchall account.

Cheers,

Le dim. 5 avr. 2020 à 23:11, Thomas L. <tom.longsh...@web.de> a écrit :

> On Thu, 2 Apr 2020 15:57:17 +0800
> Stephan Chedlivili <chedliv...@gmail.com> 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
>

Reply via email to