[Exim] Quoting "$pipe_addresses" in pipe command

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: I. Forbes
Data:  
Para: exim-users
Assunto: [Exim] Quoting "$pipe_addresses" in pipe command
Hello All

I am battling with some syntax.

I am using the following "pipe" transport to forward mail through my
virus scanning script:

pyscan:
  driver = pipe
  command = "/usr/local/lib/pyscan/pyscan.py \
                      -f<$sender_address> \
                      $pipe_addresses"
  return_output = true
  return_path_add = true
  headers_add = "X-pyscan: Scanned by eta@???"
  user = pyscan
  group = nogroup
  path = "/bin:/sbin:/usr/bin:/usr/sbin"
  current_directory = "/tmp"


However addresses with apostrophe's in the localpart, such as

o'reiley@???

Get bounced with an error:

------ o'reiley@??? ------

sh: -c: line 1: unexpected EOF while looking for matching `''
sh: -c: line 2: syntax error: unexpected end of file

It seems I need to quote the addresses in the $pipe_addresses
variable. However this is not a real variable and if I use the function

  command = "/usr/local/lib/pyscan/pyscan.py \
                      -f<$sender_address> \
                      ${quote:$pipe+addresses}


I get an error.

The behaviour I get from quoting the sender address is also not what I
want:

  command = "/usr/local/lib/pyscan/pyscan.py \
                      -f${quote:$sender_address} \
                      $pipe+addresses


Results in an envelope sender of the format

"localpart@???

Which does not work. I can probably find a work around to this one,
but I would appreciate suggestions.

I am using exim versions 3.35 and 3.36 from Debian woody and
testing.

Thanks

Ian
---------------------------------------------------------------------
Ian Forbes ZSD
http://www.zsd.co.za
Office: +27 21 683-1388 Fax: +27 21 674-1106
Snail Mail: P.O. Box 46827, Glosderry, 7702, South Africa
---------------------------------------------------------------------