[Exim] Passing variables to system filter

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Rock Scofield
Data:  
Para: exim-users
Assunto: [Exim] Passing variables to system filter
This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
I need to have some dynamic data (out of a database) be used in the system filter. I cant seem to find any variables that will pass data between exim and the system filter. So I added a header under the router that runs when the system filter runs


reply_handler:
driver = accept
domains = *
local_part_prefix = itreply-
headers_add = X-Temp-Sendto: ${lookup pgsql{select mail_from from campaigns where campaignid = split_part('$local_part','-',1)}}
transport = reply_handler_pipe

The 'reply_handler_pipe' goes to a python script that tracks replies, the system filter is to forward on the reply.

here is the system filter...

if
$h_to: contains "itreply"
then
unseen deliver $h_X-Temp-Sendto
endif

this is what i get when it runs the filter

20390 2003-09-17 16:35:27 19zj1L-0005Iq-R4 Error in system filter: malformed address "" in filter file: empty address

and if i put a static address in the filter, the X-Temp-Sendto header is not added even though it shows this in the debug

20414 ---
20414 added header line(s):
20414 X-Temp-Sendto: address@???
20414 ---

Any insight on why its not adding a header where the system filter can read it? Also if there are a set of variables that allows data between exim and the system.filter or the ability to use SQL in the system filter.

Thanks
Rock Scofield
--