Auteur: Phil Pennock Datum: Aan: Sam Smith, exim-users Onderwerp: Re: [exim] Trim down pgsql callouts
On 2008-07-16 at 17:26 -0700, Phil Pennock wrote: > Now use:
> file = ${extract {mailbox}{$address_data}}
> user = ${extract {uid}{$address_data}}
>
> With this, you have one lookup in the Router, used twice (via the
> cache); the first validates the address, the second stores it in a
> per-recipient variable of auxiliary data provided by Exim. This is
> stored in the headers/metadata spool file (*-H).
Correction -- it's not stored in the spool file. Each queue run invokes
the Routers, the Router then sets it, so it's available in the
transport. I had made a bad assumption, sorry to provide
misinformation.
So, the DB will be checked once per message in the queue, once per
queue-run.
If you have a one-recipient limit, then you can get around this by using
an $acl_m_foo variable which is stored in the spool file. For the
general case, I'm not seeing a way to reduce this.
So $address_data is definitely a big win (this is the sort of situation
it was created for, according to the docs) but not as big a win as I'd
thought.