[Exim] ${if eq ... } in pipe command

Página Inicial
Delete this message
Reply to this message
Autor: Peter Radcliffe
Data:  
Para: exim-users
Assunto: [Exim] ${if eq ... } in pipe command
I'm trying to deliver something to a slightly different command based on
the local_part of the address;

rt:
driver = smartuser
domains = "rt.MDOM"
local_parts = "rt:rt-action"
transport = rt_pipe


rt_pipe:
  driver = pipe
  path = "/usr/local/bin"
  debug_print = "delivering to: \
                 perl -T /usr/local/rt/bin/rtmux.pl \
                     rt-mailgate helpdesk \
                     ${if eq {$local_part}{rt} {correspond}{action}}"
  command = "perl -T /usr/local/rt/bin/rtmux.pl \
                     rt-mailgate helpdesk \
                     ${if eq {$local_part}{rt} {correspond}{action}}"
  log_output
  user = rt
  group = rt



The two local parts need a slightly different argument to call rt with,
correspond or action.

This fails with;

pir@some# echo "test" | exim -d rt@???
Exim version 2.12 debug level 1 uid=0 gid=1
probably Berkeley DB version 1.8x (native mode)
LOG: 0 MAIN
<= root@??? U=root P=local S=301
Exim version 2.12 debug level 1 uid=27 gid=27
probably Berkeley DB version 1.8x (native mode)
delivering message 11WokD-0005Hk-00
delivering to: perl -T /usr/local/rt/bin/rtmux.pl rt-mailgate helpdesk
correspond
LOG: 0 MAIN PANIC
== rt@??? T=rt_pipe defer (0): Expansion of "${if"
from command "perl -T /usr/local/rt/bin/rtmux.pl rt-mailgate helpdesk
${if eq {$local_part}{rt} {correspond}{action}}" in rt_pipe transport
failed: missing or misplaced { or }

I tried it on version 3.03, just in case it was an old bug, which fails
in exactly the same way.

I've got expansion variables in 'command =' lines in other places that
work fine, the debug_print works fine ... why does the command fail ?

P.

-- 
pir               pir@???      pir@???      pir@???