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

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Dave C.
Date:  
À: exim-users
Sujet: Re: [Exim] ${if eq ... } in pipe command
Can't you just modify rtmux.pl itself to hasnle the difference? Or
write a wrapper script?

On Thu, 30 Sep 1999, Peter Radcliffe wrote:

>
> 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@???

>
>
>
> --
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##
>