[Exim] String expansion problem

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Avery Fay
Dátum:  
Címzett: exim-users
Tárgy: [Exim] String expansion problem
Hi,

I'm using exim 3.35 on Debian GNU/Linux. I'm trying to change to
delivery based on the results of running the message through
spamassassin. Here's the relevant portion of the transport:

command = /usr/sbin/cyrdeliver -m ${if match
{$h_X-Spam-Status:}{.*Yes.*} {Spam}{${substr_1:${local_part_suffix}}}}
${local_part} -e

Note: I know my mailer will wrap the text above, but it's all on one
line.

What I'd like it to do is search the header X-Spam-Status for Yes and if
it matches return Spam otherwise the substr from the second part. I have
something wrong with my expansion though. In the log I get:

Expansion of "${if" from command "/usr/sbin/cyrdeliver -m ${if match
{$h_X-Spam-Status:}{.*Yes.*} {Spam}{${substr_1:${local_part_suffix}}}}
${local_part} -e" in local_delivery_cyrus transport failed: condition
name expected, but found ""

Can anyone tell me what's wrong here? Or is there a better/easier way to
do this? Please CC me on any responses as I'm not subscribed to the
list.

Thanks,
Avery Fay