Catchall mailbox *@domain.com and $sql_select_policy

Ondrej Krsko <[email protected]> Thu, 12 Sep 2024 22:17:31 +0200
Newsgroups gmane.mail.virus.amavis.user
Message-ID <CAJ8Xya8oMo9fpr1_RQFyFx4gCvdA3Db2x8O0jnGvy4bfUZfOSg@mail.gmail.com>
Dear Amavis community,

We have encountered an issue while setting up a catchall mailbox for *@
domain.com, and I would greatly appreciate your assistance.

Here is the situation:

   - We have configured a catchall mailbox for *@domain.com and are
   attempting to set specific policies for all emails sent to this mailbox.
   - Unfortunately, the setup is not working as expected because we use the
   %k parameter in $sql_select_policy. This parameter seems to only contain
   specific addresses like [email protected],
   [email protected]. However, since we are dealing with a
   catchall setup, we do not know the addresses in front.
   - Is there a way to configure $sql_select_policy to apply a policy to
   all possible addresses that are sent to *@domain.com?

Any guidance or suggestions on how to resolve this issue would be highly
appreciated.

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.

Thank you in advance for your time and help,

Ondrej.