Re: [Exim] filters

Pàgina inicial
Delete this message
Reply to this message
Autor: Steven Pokrandt
Data:  
A: exim-users
Assumpte: Re: [Exim] filters
This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Hey Phil.

I did see the problem with NO from statement. and fixed that.. correct
me If I'm wrong here
but the filter MUST be in a data statement instead of a file.. because
the file will not have the variables expanded.
or is there a way to tell exim to expand the variables in a file..


pokey


Philip Hazel wrote:

>On Sat, 12 Jul 2003, Steven Pokrandt wrote:
>
>
>
>>Is It possible to access a database within a filter.. I would like to
>>lookup the senders address something like this
>>
>># Exim filter
>>#if ${lookup mysql select sender where user='${quote_mysql:$local_part}'
>>and sender='${quote_mysql:$sender_address}'} is $sender_address
>>#then
>># mail to $sender_address
>># mail text exists in database
>>#else
>># mail to $sender_address
>># mail text DOSEN't exists in database
>>#endif
>>
>>
>
>Basically right; small syntax errors. Try this (untested):
>
># Exim filter
>if "${lookup mysql {select sender where user='${quote_mysql:$local_part}'\
> and sender='${quote_mysql:$sender_address}'}}" is $sender_address
>then
> mail to $sender_address
> mail text "exists in database"
>else
> mail to $sender_address
> mail text "DOSEN't exists in database"
>endif
>
>... and I'm no SQL expert, but don't you need "from something" in the
>SQL query?
>
>
>
>


--
<http://spamarrest.com/affl?401905> <http://www.vonage.com/?refer_id=spokra>
--