Re: Catchall mailbox *@domain.com and $sql_select_policy

Damian <[email protected]> Fri, 13 Sep 2024 07:59:39 +0200
Newsgroups gmane.mail.virus.amavis.user
Message-ID <[email protected]>
> We have encountered an issue while setting up a catchall mailbox for *@
> domain.com, and I would greatly appreciate your assistance.
> [...]
> I think the query ends up replacing parameter %k by an address like
> [email protected]. Since this address is not explicitly defined
> in the table, no policy is returned.

According to [1], Amavis will try "full address, domain only, catchall" for `%k`. As `$sql_select_policy` is processed by an 
instance of `Amavis::Lookup::SQL`, a more complete list of lookup keys is given in [2].

[1] https://gitlab.com/amavis/amavis/-/blob/v2.13.1/lib/Amavis/Conf.pm#L1187-1201
[2] https://gitlab.com/amavis/amavis/-/blob/v2.13.1/lib/Amavis/Lookup/SQL.pm#L76-85