[Exim] strange effect of incorrect header_remove router opti…

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Lutz Pressler
日付:  
To: exim-users
題目: [Exim] strange effect of incorrect header_remove router option (bug?)
Hello,

we had an incorrect exim configuration, which (at least with version
4.30) produces some strange effect. To build a "virus scanning sandwich"
(exim - virus-scanner - exim), a router

virus_route:
driver = manualroute
condition = ${if ! def:header_x-route-via: {yes}}
headers_add = "X-Route-Via: 42-intern"
route_list = * localhost byname
self = send
transport =...

adds a custom header, and other routers (used only when that header
is set) remove it again.

This has been done with
headers_remove = "X-Route-Via:"
though, which is not correct as of the specification.

15. Generic options for routers
states:

headers_remove
[...]
After expansion, the string must consist of a colon-separated list of
header names, not including the terminating colon, for example:

And yes, the terminating colon does make a difference, a very subtle one.

When only one router is involved, it works as intended nevertheless.
The X-Route-Via header is removed when the message leaves exim.

But - if two routers with headers_remove = "X-Route-Via:" are
"passed" (e.g. because of an alias file), the headers stays in
the message..

The behaviour is as intended as soon as the correct form

headers_remove = X-Route-Via

is used.

Maybe that can be fixed ("rule of least surprise").

Greetings,
Lutz

--
  _              |  Lutz Pressler          |  Tel: ++49-551-3700002
 |_     |\ |     |  Service Network GmbH   |  FAX: ++49-551-3700009
 ._|ER  | \|ET   |  Bahnhofsallee 1b       |   mailto:lp@SerNet.DE
Service Network  |  D-37081 Goettingen     |  http://www.SerNet.DE/