Philip... Thanks for the insight. I was not aware that this is how the
parsing worked. I'm surprised there isn't an easier way, but at least
that will work. Thanks again!

Jae

-----Original Message-----
From: Philip Hazel [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 15, 2006 1:46 AM
To: Potato Chip
Cc: [email protected]
Subject: Re: [exim] Exim Config and Space characters Question

This is actually quite tricky. You might think you could use this:

   transport_filter = /usr/bin/spamc -x \
     ${lookup{$local_part}lsearch{/etc/passwd}{-u\x20$local_part}}

but it wouldn't work, because the string "-u whatever" would then be 
passed as a single argument to the command, whereas you want two 
separate arguments. You have to do this:

   transport_filter = /usr/bin/spamc -x \
     ${lookup{$local_part}lsearch{/etc/passwd}{-u}} \
     ${lookup{$local_part}lsearch{/etc/passwd}{$local_part}}

It's not quite as horrendous as it looks, because the lookup will be 
cached. An alternative would be

   transport_filter = /bin/sh -c "/usr/bin/spamc -x \
     ${lookup{$local_part}lsearch{/etc/passwd}{-u $local_part}}"
     
but that costs you an additional shell process. 


-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book


-- 
## List details at http://www.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to