Robert Blayzor wrote:
> When using Exim to pull domainlists, say:
>
> domainlist db_localdoms = pgsql;.... domainlist
> db_relaydoms = pgsql;.... domainlist db_backlisted
> = pgsql;....
>
>
> We use the above referenced domainlists extensively throughout the
> Exim mail routing and ACL's, etc.
>
> The question is, does Exim execute the SQL query each and every time
> the domainlist is referenced/used? If so, if you have about 20
> routers, etc... that seems like an excessive amount; especially if
> the domainlist isn't expected to change much for a single email
> transaction.
>
> If this is the case, is there any recommendations other than not
> using SQL for domainlists and other data that may be pulled and
> referenced via the whole mail routing/acceptance process?
>
ISTR that anything of a 'hostlist' or 'domainlist' structure is cached,
regardless of from whence derived. But I've been wrong before..
In any case .. though I've used PostgreSQL extensively within Exim, I do
not use it for either of those, partly 'coz in my case those are very
slow-changing - if not static - lists.
For those that do change more often, I use an lsearch, wildlsearch, or
ipsearch against a simple flat file.
Flat-file can, of course, be one that is generated and published BY an
SQL critter, and updated as often as a 'trigger' or stored procedure
decides.
That way, Exim won't stop transferring mail if the SQL engine goes hors
d' combat for a time. Just soldiers-on with the most-recent file it was
given.
Pretty sure the overall resource load is lessened as well, but have
never actually measured it accurately.
Bill
--
韓家標