[Exim] Problem with ${if ...} [Exim 4.30]

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Doug Fields
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [Exim] Problem with ${if ...} [Exim 4.30]
Hello all,

I'm trying to use a pipe transport which takes a command-line parameter
using the $authenticated_id variable. However, I want the parameter to
be NONE (or somesuch) when that parameter is not available because the
user didn't authenticate (say, they were in an allowed relay IP
address).

However, I'm getting an error when I do this:

Expansion of "${if" from command "/opt/bin/acceptmail -a ${if eq
{}{${authenticated_id}} {NONENONE} {${authenticated_id}} } -f
${sender_address} -i ${interface_address} -o ${sender_host_address} -b"
in remotemail_transport transport failed: condition name expected, but
found ""

I've tried a number of variants on this:

${if eq {}{${authenticated_id}} {NONENONE} {${authenticated_id}} }
${if eq {${authenticated_id}}{} {NONENONE} {${authenticated_id}} }
${if eq {$authenticated_id}{} {NONENONE} {$authenticated_id} }
${if eq {$authenticated_id}{} {NONE_NONE} {$authenticated_id} }

And they all result in the same error (in paniclog).

I followed the directions from page 389 in the Exim 4 book, and indeed,
some tests from the command line seem to work:

/etc/exim4/conf.d/transport# exim4 -be
> ${if eq{}{} {equal} {not equal}}

equal
> ${if eq{xx}{} {equal}{not equal}}

not equal

Any thoughts?

Thanks,

Doug