[exim] String expansion in transport filter

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Marcin Krol
Date:  
À: exim-users
Anciens-sujets: Re: [exim] Message delivery when home directory does not exist
Sujet: [exim] String expansion in transport filter
Hello everyone,

String expansion of following expression in "exim -be" works correctly:

da7 (87.204.147.157) /usr/local/bin % exim -be
> ${if eq{${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}}}{} {remote}{local}}

remote

However, this string when placed as argument in transport_filter
fails:

2007-08-08 21:01:21 1IIqmX-0008AW-5r == tda7@???
R=spamcheck_director T=spamcheck defer (-1): Expansion of "${if" from
command "/usr/local/bin/mailfilter -x ${if
eq{${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}}}{}
{remote}{local}}" in transport filter failed: condition name expected,
but found ""

The transport in question:

spamcheck:
driver = pipe
batch_max = 100
command = /usr/sbin/exim -oMr filtered -bS
current_directory = "/tmp"
group = mail
home_directory = "/tmp"
log_output
message_prefix =
message_suffix =
return_fail_output
no_return_path_add
transport_filter = /usr/local/bin/mailfilter -x ${if eq{${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}}}{} {remote}{local}}
#-u ${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}} -d $domain -l \"$local_part\" -s $message_size -a $sender_address -m $message_id -c $rcpt_count -t $received_protocol -e /home/${lookup{$domain}lsearch{/etc/virtual/domainowners}{$value}}/.spamassassin/user_prefs -p $pipe_addresses
use_bsmtp
user = mail

Does anybody know why it fails this way?


--
Marcin Krol