[exim] headers_add / remove issues

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Mc
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [exim] headers_add / remove issues


Lets say i have something like that:

virtual: transport generates a message to recipients from database, it
adds header X-Virtual: to every message, we want use it to get know if
the message was generated by this router. We do condition checking at
virtual_rw which also should remove X-Virtual header.

The problem is, that:
Condition checking in virtual_rw: always fails, and even if i do other condition
(mysql lookup) it does not remove X-Virtual header, also if i do
header_remove in virtual_smtp it does not remove it either.
Any ideas? It's very strange.

10:21:09 38429 checking "condition"
10:21:09 38429 condition: def:h_X-Virtual:
10:21:09 38429    result: false
10:21:09 38429 expanding: true
10:21:09 38429    result: true
10:21:09 38429 skipping: result is not used
10:21:09 38429 expanding: false
10:21:09 38429    result: false
10:21:09 38429 expanding: ${if def:h_X-Virtual: {true}{false}}
10:21:09 38429    result: false
10:21:09 38429 virtual_rw router skipped: condition failure


Seems exim do not see this header?

begin routers

virtual_rw:
driver = dnslookup
domains = ! +local_domains
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
condition = ${if def:h_X-Virtual: {true}{false}}
headers_remove = X-Virtual
transport = virtual_smtp
no_more


virtual:
driver = redirect
condition = ${lookup mysql{DB_SELECT}{$value}fail}
domains = +local_domains
check_ancestor
headers_add = X-Virtual: 1
data = ${lookup mysql{DB_SELECT}{$value}fail}
no_more

# in transports

virtual_smtp:
driver = smtp
headers_remove = To:Envelope-to
headers_add = "To: $local_part@$domain"

--
Mc.