Re: [exim] rewriting headers (add and remove)

Pàgina inicial
Delete this message
Reply to this message
Autor: Michael Johnson
Data:  
A: exim-users
Assumpte: Re: [exim] rewriting headers (add and remove)
On 22 Jun, 2005, at 10:44:07 AM EDT, Philip Hazel wrote:

> On Wed, 22 Jun 2005, Michael Johnson wrote:
>
>> This is the router I used in 4.43 with (apparently) no problems.
>> I didn't
>> change anything with the update to 4.51. No...seriously...I
>> didn't change
>> anything. What's missing?
>>
>
> The rest of the router! What you have quoted are two options settings
> from a router. There must be more to a router than that; it needs a
> name, and a "driver" option for a start, and probably a "transport"
> option, unless it's a manualrouter router.


D'oh! It looks like I did add something. In 4.43, it was simply the
last entry in the routers section. The entire routers section is:

begin routers


dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more

# mailman_router:
#   driver = accept
#   require_files = MAILMAN_HOME/lists/$local_part/config.pck
#   local_part_suffix_optional
#   local_part_suffix = -bounces : -bounces+* : \
#                                         -confirm+* : -join : - 
leave : \
#                                         -owner : -request : -admin
#   transport = mailman_transport


mysql_sys_aliases:
   driver = redirect
   allow_fail
   allow_defer
   data = ${lookup mysql {SELECT dest FROM aliases \
             WHERE email='${local_part}' AND type="system"}}


mysql_aliases:
   driver = redirect
   allow_fail
   allow_defer
   data = ${lookup mysql {SELECT dest FROM aliases \
             WHERE email='${local_part}@${domain}' AND type="site"}}


#----------------------------------------------------------------------- 
---------
   vacation_director:
           driver = accept
           domains = ${lookup mysql {SELECT domain from passwd WHERE \
                         domain='${quote_mysql:$domain}' AND \
                         user='${quote_mysql:$local_part}' AND \
                         vacation_start <= curdate() AND \
                         vacation_end >= curdate()}\
                 {$value}}
           no_verify
           senders = !^.*-request@.* : !^owner-.*@.* : ! 
^postmaster@.* : \
           ! ^listmaster@.* : !^mailer-daemon@.*
           transport = vacation_autoreply
           unseen
#----------------------------------------------------------------------- 
---------


mysql_user:
   driver = accept
   condition = ${if eq{} {${lookup mysql {SELECT home FROM passwd \
                 WHERE id='${local_part}@${domain}'}}} {no}{yes}}
   retry_use_local_part
   transport=mysql_delivery


   mysql_catchall:
   driver = redirect
   allow_fail
   allow_defer
   data = ${lookup mysql {SELECT dest FROM aliases \
             WHERE email='*@${domain}' AND \
             type="site"}}


# If both Reply-to and List-Post exist, copy original Reply-To
# If List-Post exists, generate Reply-To from it
headers_add     = ${if match {$header_list-post:} {\<mailto:(.*)\>} \
                 {${if def:header_reply-to: \
                 {X-Orig-reply-to: $header_reply-to:\nReply-To: <$1>} \
                 {Reply-To: <$1>} }} \
                 {} }



# If both Reply-to and List-Post exist, remove original Reply-To
headers_remove = ${if and { \
                 {def:header_reply-to:} {def:header_list-post:}\
                 } {reply-to} fail }


The only difference I can see between the 4.43 router section and
this one is the addition of the vacation section. How did adding the
vacation section change the behavior of the headers_add
headers_remove sections?

-Michael

---------------------------------------
There will always be those who dare to take great risks. Rather than  
mourn their loss, we should value their contributions.
             --Jesse Brown