[exim] Setting Reply-To automatically for all list mail (was…

Top Page
Delete this message
Reply to this message
Author: Marc Sherman
Date:  
To: exim-users
Old-Topics: Re: [exim] Domain Keys
Subject: [exim] Setting Reply-To automatically for all list mail (was Re: Domain Keys)
Graeme Fowler wrote:
>
> That's because Philip (and others) have probably configured their MUA to
> send a Reply-To: header to the list, which directs replies to the list
> for those subscribers whose MUAs conform to accepted best practice and
> comply with that wish.


I've got _exim_ configured to set reply-to to the list, for all outgoing
_and_ incoming mail. Here's how I did it, in case others would find this
useful:

begin routers

# For outgoing messages to mailing lists in ~/.list-folders, add a
# reply-to if there isn't one already, then pass to dnslookup
remote_list:
   debug_print = "R: remote_list for $local_part@$domain"
   driver = redirect
   domains = ! +local_domains
   require_files = /home/$authenticated_id/.list-folders
   condition = ${if and {{def:authenticated_id}{!def:h_Reply-To:}} \
               {${lookup {$local_part@$domain} lsearch \
               {/home/$authenticated_id/.list-folders}{true}{false}}}}
   headers_add = Reply-To: <$local_part@$domain>
   data = $local_part@$domain
   redirect_router = dnslookup


# For incoming messages from mailing lists in ~/.list-folders, add a
# reply-to if there isn't one already, and file in the list folder
local_list:
   debug_print = "R: local_list for $local_part@$domain"
   driver = redirect
   domains = +local_domains
   check_local_user
   directory_transport = local_maildir
   require_files = $home/.list-folders
   condition = ${if def:h_List-Post:}
   address_data = ${if match{$h_List-Post:}{<mailto:(.+)>}{$1}fail}
   data = ${lookup{$address_data}lsearch{$home/.list-folders} \
          {$home/Maildir/$value/}fail}
   headers_add = ${if def:h_Reply-To: \
                 {X-Reply-To: $h_Reply-To:\nReply-To: <$address_data>} \
                 {Reply-To: <$address_data>} }
   headers_remove = ${if def:h_Reply-To: {Reply-To}{}}
   skip_syntax_errors
   syntax_errors_to = real-$local_part@$domain
   syntax_errors_text = Error in ~/.list-folders.


and here's an excerpt of my ~/.list-folders file:

exim-dev@???: .Lists.exim-dev
exim-users@???: .Lists.exim-users

- Marc