[Exim] Filename in a pipe transport

Top Page
Delete this message
Reply to this message
Author: Jonas Oberg
Date:  
To: exim-users
Subject: [Exim] Filename in a pipe transport
Greetings!

I'm following up to a message in 1999 by Malcolm Beattie. Malcolm
posted a question asking how to get the filename used in a "save"
command in a file_transport pipe transport. He was told to use
${address_file}, like this (from my own configuration):

# Transport:
filter_file:
driver = pipe
command = "/usr/cyrus/bin/deliver -m ${address_file} -a ${local_part} ${local_part}"
user = cyrus
group = mail
return_output
prefix =
log_output

# Director:
exim_filter:
driver = forwardfile
file = /var/spool/filters/$local_part
no_check_local_user
no_verify
file_transport = filter_file
filter


In /var/spool/filters/jonas (the Exim filter for my mailbox user) I
put the command "save foo". However, when debugging Exim, it becomes
clear to me that ${address_file} does not work in a pipe transport
like the above (neither does ${address_pipe} by the way):

   filter_file transport entered
   direct command:
     argv[0] = /usr/cyrus/bin/deliver
     argv[1] = -m
     argv[2] = ${address_file}
     argv[3] = -a
     argv[4] = ${local_part}
     argv[5] = ${local_part}
   direct command after expansion:
     argv[0] = /usr/cyrus/bin/deliver
     argv[1] = -m
     argv[2] =
     argv[3] = -a
     argv[4] = jonas
     argv[5] = jonas


Could someone please enlighten me? How do I pass the filename used in
the filter to the filter_file transport, since neither address_file
nor address_pipe works, or is it a bug that they do not?

I'm currently using Exim 3.35.


Regards,
Jonas