Re: [Exim] filter syntax

Pàgina inicial
Delete this message
Reply to this message
Autor: Craig Jackson
Data:  
A: exim-users
Assumpte: Re: [Exim] filter syntax
Philip Hazel wrote:

>On Thu, 23 Oct 2003, cjackson wrote:
>
>
>
>>Problem: When I add more conditions to the below filter, like one of
>>these....
>>if personal or $h_subject: does not contain *SPAM* \n \
>>if personal or "$h_subject": does not contain "*SPAM*" \n \
>>if personal or ("$h_subject": does not contain SPAM ) \
>>etc etc; Exim gives errors reading the filter.
>>
>>It seems that any multipart condition fails. Any ideas?
>>
>>
>
>Please read the document about Exim filter syntax. You can either use
>
>  if condition then
>    if condition then
>    ...
>    endif
>  endif

>
>or
>
>  if condition1 and
>     condition2 and
>     ...
>  then
>  ...
>  endif

>
>What you wrote is neither of those forms.
>
>You can use parentheses where needed, e.g.
>
> if (condition1 or condition2) and condition3 then...
>
>
>

Thanks Philip, for the response. I realize after posting that my
question wasn't well put together. I wasn't trying to sting together
those statements. Here is what I couldn't get to work:


out_of_office:
 driver = redirect
 allow_filter = true
 user = mail
 hide condition = ${if eq {${lookup ldap  \
{user="cn=admin,dc=localsurface,dc=com" \
       pass=PASS  \
ldap:///cn=${quote_ldap:$local_part},ou=${quote_ldap:$domain}, \
       dc=localsurface,dc=com?outOfOffice?sub?}}}{true}{yes}{no}}
 hide data = # Exim Filter \n \
       if personal  and $h_subject: does not contain "SPAM" \n \
       then \n \
          mail to $sender_address \
               from $local_part@$domain \
               subject "Out of Office" \
               text "${lookup ldap
{user="cn=admin,dc=localsurface,dc=com" pass=PASS \


ldap:///cn=${quote_ldap:$local_part},ou=${quote_ldap:$domain},\
               dc=localsurface,dc=com?outOfOfficeText?sub?}}" \
               once /home/vmail/$domain/$local_part \
               once_repeat 7d \
       endif
 reply_transport = out_of_office_reply
 unseen


Which is your latter suggested syntax. If I remove the 2nd part of the
multi-line condition in hide data, the filter works. Now it's no big
deal anymore because I converted this to a "simple" router as per the
advice of Tamas and had no trouble with the same type of confdition.

Craig

--
Craig Jackson
cjackson@???