Am 06.04.25 um 22:01 schrieb Mark Elkins via Exim-users:
In MYSQL - try:-SELECT GROUP_CONCAT(domain SEPARATOR ':') AS domain FROM mail_domains On 2025/04/06 21:43, Ray O'Donnell via Exim-users wrote:I do the same thing using PostgreSQL - my lookup looks like this (built with help from this list):MAIN_LOCAL_DOMAINS = @ : ${lookup pgsql{select string_agg(domain_name, ':') from domains where is_enabled = true}}
Please consider this:All those valid and working examples read in the entire list of domains. If your domainlist has 1 entry , it's fine. If it has 10, it's fine. If it hits 2000, you will have a small perfomance issue. Depending on your incoming mail numbers per second, it could be a bigger-than-you-think issue.
The next thing that happens is, exim has to process that "immense" list, and if the desired value is at the end, it has wasted a lot of cpu cycles to get there, same as the database.
This can easily be avoided. Two hints: a) your select can not use an index because, you do not have a where clauseb) there is an easy way to reduce the list to 1 result. you will find it in the middle of this document page:
https://www.exim.org/exim-html-current/doc/html/spec_html/ch-domain_host_address_and_local_part_lists.htmlIf one asks, why i do not post the final solution: it's a learning opportunity which will change away more in the exim config, than one might expect now.
best regards, Cyborg
OpenPGP_0x048770A738345DD3.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
-- ## subscription configuration (requires account): ## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/ ## unsubscribe (doesn't require an account): ## exim-users-unsubscr...@lists.exim.org ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/