Re: [exim] No-op router?

Inizio della pagina
Delete this message
Reply to this message
Autore: Cyborg
Data:  
To: exim-users
Oggetto: Re: [exim] No-op router?
Am 11.06.2013 18:39, schrieb lists@???:
> Hi all
> I'm using a virtual users setup with a mysql database.
> I'm trying to reduce the number of sql lookups because there are just
> too many simple queries at the moment (is forwarding enabled,
> store-and-forward, vacation,...).
> Now I want to have a router whose sole purpose is to fill
> address_data. On subsequent routers it would then be possible to use
> ${extract{var}{$address_data}} instead of all these lookups.
> I don't want to set this on a "real" router because they all only
> apply if some conditions are met.
>
> Is there a way to have a router only add address_data and pass the
> message on to the next router?
>
> (I tried using a verify_only router with an acl that set a custom
> acl_c var with the content of $address_data. This almost worked - I
> got stuck with a redirect router, as the "new" forwarded mail had the
> same acl_c_ vars, but needed to have its own).


autoresponder:
driver = redirect
domains = +local_domains
condition =
data =
allow_fail
allow_defer
no_verify
no_expn
check_ancestor
unseen
more
pipe_transport = address_pipe
reply_transport = address_reply
*redirect_router = NEXTROUTER*

*But*,

why don't you set those informations in an ACL ? Which is more useful in
the whole process.

But²,

If you have to many sql statements, increase the mysql cache.

And,

instead of selecting the data needed, just put it into the querie itself
. i.e.

select '1' from mailboxes where (hour(CURTIME())*3600
+MINUTE(CURTIME())*60)> TIMEFROM and ... < TIMETO and
address='email@???' ...

If you put something like that into your router condition, it only
applies if the time matches. Using UNIXTimestamps in a creative way,
allows us i.e. to have autoresponders from 1th May 00:00 to 1.Jun
10:00 or daily 10:00 to 12:00 ..

hope that helps.

Marius