[Exim] Help with condition required

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Paul Walsh
Fecha:  
A: Exim Users (E-mail)
Asunto: [Exim] Help with condition required
Following on from recent discussions about SpamAssassin I thought I'd have a
go. I managed to get it working fine after a few teething probs but some
users complained about the SPAM: information being added and wanted to know
if there was an opt in/out (I've since configured SA to put the info in the
headers).

This set me thinking and the solution I'm trying to come up with uses a
modified condition in the director which should only succeed if the received
protocol isn't spam_checked AND the local part can be looked up in a file:

spam_to_check:
  driver = smartuser
  transport = spam_scan
  condition = ${if and { {!eq {$received_protocol} {spam_checked} }\
 { eq {${lookup {$local_part} lsearch {/usr/exim/tables/SA_users} {1}}} {1}
}\
                       }}


I'm obviously going wrong somwhere because I get the following error:

LOG: 0 MAIN PANIC DIE
failed to expand condition"${if and { {!eq {$received_protocol}
{spam_checked}}{ eq { ${lookup {$local_part} lsearch
{/usr/exim/tables/SA_users} {1}}} {1} }}}" for spam_to_check director:
missing or misplaced { or }

Could someone please point out where I'm going wrong?

Paul