Autor: Jim Archer Data: Para: exim-users Asunto: [Exim] Problem with string expansion in transport for Cyrus :-(
Hello All...
I am having a problem with string expansion with Exim 4.2. In my transport
I need to pipe a message to a command to deliver the message to Cyrus21.
This program (usually called deliver but under Debian renamed cyrdeliver)
will allow me to use + addressing to deliver directly into a folder. So, I
am trying to achieve this:
command = /usr/sbin/cyrdeliver -a jarcher -- jarcher+SPAM
I have tried to use this:
command = /usr/sbin/cyrdeliver -a "${local_part}" -- "${local_part}""${if
def:h_X-Spam-Is-Spam:{+SPAM}{}}"
I have also tried many, many variations with and without the quotes and
such.
So that if the X-Spam-Is-Spam: header appears in the message I get +SPAM
appended to the local user name and not if not.
For some reason, it seems that a : is added, either in place if the nothing
or after the +SPAM. Here is the error I get in the Exim log:
2004-02-05 03:37:36 1Aof0m-0001cT-5j <jarcher@local>: local_delivery_cyrus
transport output: +SPAM: Mailbox does not exist
2004-02-05 03:37:36 1Aof0m-0001cT-5j ** jarcher@local <jim@???>
R=local_user T=local_delivery_cyrus: Child process of local_delivery_cyrus
transport returned 65 (could mean error in input data) from command:
/usr/sbin/cyrdeliver
There is a SPAM mailbox, but no : belongs there. It seems that cyrdeliver
is trying to put the mail into a folder called SPAM: instead of SPAM. I
have pasted my transport below and would appreciate any assistance. Of
course I tried the -be switch, but without a message to process it was not
very helpful. Thanks very much.
local_delivery_cyrus:
driver = pipe
command = /usr/sbin/cyrdeliver -a "${local_part}" -- "${local_part}""${if
def:h_X-Spam-Is-Spam:{+SPAM}{}}"
user = cyrus
group = mail
log_output
message_prefix =
message_suffix =