Hi,
Cyborg <cyborg2@???> (Mo 04 Jul 2016 11:08:23 CEST):
> Hi,
>
> does anyone see a way to optimize one condition away without changing
> the SQL ?
>
> condition = ${if !eq{TXTA}{${lookup mysql {SELECT --SQL-- }}} {1}}
> condition = ${if !eq{TXTB}{${lookup mysql {SELECT --SQL-- }}} {1}}
Exim caches the last lookup and reuses it if it looks the same.
But *any* lookup that is not identical to the lookup done before
invalidates the cache.
> set acl_m9 = ${lookup mysql {SELECT --SQL-- }}
> condition = ${if !eq{TXTA}{$acl_m9} {1}}
> condition = ${if !eq{TXTB}{$acl_m9} {1}}
Yes, should work.
> Also an option would be something like this : any REGEX available at
> that point?
>
> condition = ${if !Regexp{(TXTA|TXTB)}{ SQL } {1}}
Check for the "match" condition.
condition = ${if match{ SQL }{TXT(A|B)}}
Best regards from Dresden/Germany
Viele Grüße aus Dresden
Heiko Schlittermann
--
SCHLITTERMANN.de ---------------------------- internet & unix support -
Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
gnupg encrypted messages are welcome --------------- key ID: F69376CE -
! key id 7CBF764A and 972EAC9F are revoked since 2015-01 ------------ -