[Exim] Exim router condition param syntax.

Pàgina inicial
Delete this message
Reply to this message
Autor: Tom Parker
Data:  
A: exim-users
Assumpte: [Exim] Exim router condition param syntax.
Hi there - Im currently writing some code to plug into exim to perform challenge/response type white listing of email addresses.
Just about everything works, other than my whitelist_check router. The principal of the thing is similar to that of the way amavis works. Emails get saved to a temp file, if the from address is white listed then sendmail is invoked with "-oMr whitelist-ok" which
should then be seen by exim as already having been checked against the white list and processed to the following router's.

Anyway - so follows is my router:

whitelist_check:
  no_verify
  driver = accept
  transport = whitelist_transport
  condition = ${lookup {$local_part@$domain}lsearch{/usr/exim/etc/whitelists}\
             {\
                    ${if !eq {$received_protocol}{whitelist-ok}{yes}}\
             }\
                     {no}\
             }


The syntax of the condition statement doesn't seem entirely logical. My intention is to do something like:
if ( $local_part@$domain} is in /usr/exim/etc/whitelists) && ($recieved_protocol != whitelist-ok) then execute
the transport pipe. Help fixing this minor issue would be a big help. I dont have a whole lot of time to trawl
through lots of documentation. I'll make the code available to the community if anyone is interested.

Cheers
-Tom