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: [email protected] \n\  From: [email protected]

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: [email protected]

but specifying multiple headers will not generate the desired format of

headers_add  To: [email protected] \n\
     From: [email protected]

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 = [email protected]
   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}}


-- 
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to