Re: [Exim] headers_add not working

Top Page
Delete this message
Reply to this message
Author: David Saez
Date:  
To: Philip Hazel, exim-users
Subject: Re: [Exim] headers_add not working
Hi !!

> What you didn't tell me was that an "unseen" router is involved in this.
> The debug output tells me that *three* deliveries are actually done for
> this message:
>
> 2. Using the spam_transport transport for david@???. This one gets
> the added header.


this one also does not have the header added !! (I really check it)

> An "unseen" router causes a clone of the current address to be created,
> and passed on for continued routing. This affects added headers. The
> code contains this comment:


the only involved router with the unseen option (the one with transport
spam_transport) is parsed BEFORE the router that tries to add the
headers.

> In other words, any headers_add or headers_remove options that are
> encounted before the cloning operation happens are applied to the
> "unseen" delivery, and not to deliveries that result from subsequent
> routing.


but, the headers_add happens AFTER the unseen (routers config follows)


begin routers

# Handle mail copies

copymail:
driver = accept
transport = copy_transport
address_data = ${lookup mysql {MYSQL_POPCPY}{$value}fail}
no_verify
unseen

dnslookup:
  driver = dnslookup
  domains = ! +local_domains
  transport = remote_smtp
  ignore_target_hosts = 127.0.0.0/8 : 10.0.0.0/8 : 172.16.0.0/12 : \
                        192.168.0.0/16 : 0.0.0.0/8 : 1.0.0.0/8 :
2.0.0.0/8 : \
                        192.0.2.0/24 : 224.0.0.0/3 : 64.94.110.0/24
  same_domain_copy_routing = true
  cannot_route_message = Remote domain not found in DNS
  no_more


spam_director:
driver = accept
retry_use_local_part
transport = spam_transport
no_verify
unseen

system_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{/usr/local/exim/aliases}}
user = exim
file_transport = address_file
pipe_transport = address_pipe

# Virtual aliases

virtual_aliases:
driver = redirect
allow_defer
allow_fail
data = ${lookup mysql {MYSQL_ALIAS}}
forbid_file
forbid_include
forbid_pipe
retry_use_local_part
skip_syntax_errors
headers_add = X-Forward: for $local_part@$domain by $sender_address at
$prima$

# Per-user filtering

user_filter:
driver = redirect
data = ${lookup mysql {MYSQL_FILTER}}
verify = false
allow_filter
user = exim
forbid_file
forbid_filter_existstest
forbid_filter_logwrite
forbid_filter_lookup
forbid_filter_readfile
forbid_filter_run
forbid_include
forbid_pipe
skip_syntax_errors
syntax_errors_to = postmaster@???
reply_transport = address_reply

# Real user

virtual_local_user:
driver = accept
domains = ${lookup mysql {MYSQL_USER}{$value}}
retry_use_local_part
transport = virtual_delivery



--
Thanx & best regards ...

Useless Invention: Digital clock-winder.

----------------------------------------------------------------
   David Saez Padros                http://www.ols.es
   On-Line Services 2000 S.L.       e-mail  david@???
   Pintor Vayreda 1                 telf    +34 902 50 29 75
   08184 Palau-Solita i Plegamans   movil   +34 670 35 27 53
----------------------------------------------------------------