[exim] supplying headers_add from an lsearch won't work

Inizio della pagina
Delete this message
Reply to this message
Autore: Don Walker
Data:  
To: Exim Users
Oggetto: [exim] supplying headers_add from an lsearch won't work
I host a number of maillists using exim and mysql. Some of the lists
need the To: and From: headers altered in the generated messages. In my
router for the lists my headers_remove option works fine using an
lsearch on a file with entries for each list's $local_part, as in

headers_remove = ${lookup{$local_part}lsearch{/etc/exim/mlremhdr}}

where the file mlremhdr contains entries like

mylist: To:From

I also want to add headers in the same manner using another file which
also contains an entry for each list with the headers_add content, as in

headers_add = ${lookup{$local_part}lsearch{/etc/exim/mladdhdr}}

where the file mladdhdr contains entries like

mylist: To: aaaaa@??? \n\ From: xxxxx@???

I cannot get the content presented by the lsearch to show up in a format
acceptable to the router's headers_add option. I have tried many
variations in formatting the To: and From: header content, including
separate lines for each header. A single header works fine, as in

mylist: To: aaaaa@???

but specifying multiple headers will not generate the desired format of

headers_add  To: aaaaa@??? \n\
     From: xxxxx@???


which works if manually coded in the router.

Can anyone tell me how to make this work? My maillist router looks like
this:

maillist:
   driver = redirect
   syntax_errors_to = me@???
   local_parts = /etc/exim/maillists
   data = ${lookup{$local_part}lsearch{/etc/exim/maillists} \
      {${lookup mysql{select email from $value}}}}
   headers_remove = ${lookup{$local_part}lsearch{/etc/exim/mlremhdr}}
   headers_add = ${lookup{$local_part}lsearch{/etc/exim/mladdhdr}}