Search the web
Sign In
New User? Sign Up
exim-users · Exim MTA
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
[Exim] condition = and mysql lookup   Message List  
Reply | Forward Message #69815 of 85778 |
Re: [Exim] condition = and mysql lookup

Well,
the problem is it doesn't work.
the sql query works fine with a {no}{yes} and the
header check works fine with {yes}{no} separately.


On Tue, Jul 27, 2004 at 07:52:44PM +0300, Odhiambo Washington typed:
:: * jmab@... <jmab@...> [20040727 18:59]: wrote:
:: > hello i am using exim4.41 and i meet the following problem
:: > when defining a condition:
:: >
:: > condition = ${if and { \
:: > {eq {'1'} \
:: > {${lookup mysql{SELECT loc_on_vacation \
:: > FROM t_localmail \
:: > WHERE loc_alias='${local_part}@${domain}' \
:: > AND loc_is_active=1} {$value}fail}} } \
:: > {!match {$h_subject:} {ADV} } \
:: > } {no}{yes}}
:: >
:: > what I want is the condition to succeed if the lookup succeeds ans
:: > the "Subject" header doesn't match "ADV".
:: >
:: > 1)
:: > It seems that for the mysql lookup I have to invert the "{yes}{no}"
:: > to "{no}{yes}", this is strange as the documentation says that
:: > the 1st element is for the true case of the condition.
:: >
:: > 2)
:: > As I have to play "{no}{yes}" for the mysql lookup to work fine,
:: > I can't use the second condition in the right way.
:: >
:: > could someone give some light on this?
::
:: Let me try..
::
::
:: VACATION = mysql;SELECT loc_on_vacation FROM t_localmail WHERE
loc_alias='${local_part}@${domain}' AND loc_is_active=1
::
:: condition = ${ if and { \
:: {eq {'1'} {VACATION}} \
:: {!match {$h_subject:} {ADV}} \
:: } \
:: {yes}{no}}
::
::
::
:: So if the VACATION query returned 1 and the subject did not contain ADV,
:: then the condition succeeds (yes) else it fails {no}...
::
:: I believe the placement of {yes}{no} depends on if this, then this, else
:: that ;)
::
::
::
::
::
:: -Wash
::
:: http://www.netmeister.org/news/learn2quote.html
::
:: --
:: +======================================================================+
:: |\ _,,,---,,_ | Odhiambo Washington <wash@...>
:: Zzz /,`.-'`' -. ;-;;,_ | Wananchi Online Ltd. www.wananchi.com
:: |,4- ) )-,_. ,\ ( `'-'| Tel: +254 20 313985-9 +254 20 313922
:: '---''(_/--' `-'\_) | GSM: +254 722 743223 +254 733 744121
:: +======================================================================+
:: "I'd love to go out with you, but I did my own thing and now I've got
:: to undo it."

--

--

## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details
at http://www.exim.org/ ##




Tue Jul 27, 2004 4:58 pm

jmab@...
Send Email Send Email

Forward
Message #69815 of 85778 |
Expand Messages Author Sort by Date

hello i am using exim4.41 and i meet the following problem when defining a condition: condition = ${if and { \ {eq {'1'} \ {${lookup mysql{SELECT...
jmab@...
Send Email
Jul 27, 2004
3:59 pm

Well, the problem is it doesn't work. the sql query works fine with a {no}{yes} and the header check works fine with {yes}{no} separately. ... -- -- ## List...
jmab@...
Send Email
Jul 27, 2004
5:08 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help