Re: [Exim] transport filter arguments/exists fails?

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: John Horne
Dátum:  
Címzett: Exim Users List
Tárgy: Re: [Exim] transport filter arguments/exists fails?
On 07-Jun-2002 at 15:57:57 John Horne wrote:
> Using Exim 4.04 I have the following transport setup:
> spamcheck:
>   driver = pipe
>   command = /usr/local/exim/bin/exim -oMr spam-scanned -bS
>   transport_filter = /usr/bin/spamc -f "${if exists \
>    {TABLES/spam-configs/$local_part} {-C
>              TABLES/spam-configs/$local_part}}"
>   use_bsmtp
>   home_directory = /tmp
>   current_directory = /tmp
>   user = exim
>   no_return_path_add
>   log_output
>   return_fail_output
>   message_prefix =
>   message_suffix =
>   timeout = 10m

>
> TABLES is a macro. The problem is the -C option to the spamc command in
> the transport_filter. (I have modified spamc to cater for '-C' before
> anyone says anything!) Exim works fine, but the exists test seems to fail
> ? (I think). If I explicitly change the filter to:
>
> transport_filter = /usr/bin/spamc -f -C TABLES/spam-configs/$local_part
>
> then it all works fine. So permissions to the file isn't a problem, nor
> are my mods to spamc.
>

I received no replies to this, but working on it a bit more yesterday it
seems that

  transport_filter = /usr/bin/spamc -f "${if exists \
     {TABLES/spam-configs/$local_part} {-C TABLES/spam-configs/$local_part}}"


fails whilst

  transport_filter = /usr/bin/spamc -f -C "${if exists \
     {TABLES/spam-configs/$local_part} {TABLES/spam-configs/$local_part}}"


works fine. (I change spamc to accept -C with or without an following
argument).


Regards,

John.

------------------------------------------------------------------------
John Horne, University of Plymouth, UK           Tel: +44 (0)1752 233914
E-mail: jhorne@???
PGP key available from public key servers