[exim] Replacing wildlsearch with query-style lookups?

Pàgina inicial
Delete this message
Reply to this message
Autor: Niels Kobschätzki
Data:  
A: João Camara via Exim-users
Assumpte: [exim] Replacing wildlsearch with query-style lookups?
Hi,

I want to move my file lookups to database lookups (mariadb). While it is no problem with some of those file lookups because they become simple SELECTs. But I have a problem with (n)wildlsearch. Because I just don't know how I could replace them.
For example a sender-lookup for:

^.*@(.*\.)?domain\.tld$

How would I do look something like this up? I know that it would be easy to just look up a domain or a complete sender, but in this case I want for example block a domain and all possible subdomains from that domain.

Or I redirect some users that send out newsletters to special servers. I do that by doing a wildlsearch and have there an entry like:

^bounce.*@???

Since there is always a random string coming after the bounce.
Is there a way to realize that with a database lookup? I know that there is apparently a regexp-lookup for mariadb (https://mariadb.com/kb/en/regexp/) but I think I cannot use that. Because I actually get the sender-address and would need to put the regexp in the database.

The only solution so far I come up with that I can put singular senders and domains in tables and have multiple ACLs and routers.
And then have an extra file for those cases where I need a regexp but then someone who needs to debug things, needs to look into several places (even though I could for example add some info into the log-messages, so that the debugging person has a better clue where to look).

How are others on the list solving this problem?

Best,

Niels

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/