[exim-dev] One address, two different header modifications

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Leszek Dubiel
Data:  
Para: exim-dev
Assunto: [exim-dev] One address, two different header modifications

Current Exim behaviour:

"*Warning 2*: If the *unseen* option is set on the router, all header
additions are deleted when the address is passed on to subsequent
routers. For a *redirect* router, if a generated address is the same as
the incoming address, this can lead to duplicate addresses with
different header modifications. Exim does not do duplicate deliveries
(except, in certain circumstances, to pipes -- see section 22.7
<http://www.exim.org/exim-html-4.68/doc/html/spec_html/ch22.html#SECTdupaddr>),
but it is undefined which of the duplicates is discarded, so this
ambiguous situation should be avoided. The *repeat_use* option of the
*redirect* router may be of help."

For many people it would perfect for exim to deliver both duplicates --
evey one with different set of header modifications. So it would be one
onf "certain circumstances". Certain circumstance is when we have
different set of header modifications for the same address. This is when
exim SHOULD deliver both duplicates.

I will describe why this is important -- look below.



Administrators often modify headers to let user filter messages somehow.
For example in a company "mycompany.com" there are two emails:

-- orders@??? -- clients send orders here
-- director@??? -- clients use this address to contact director.

Exim configuration is such that exim copies every message sent to
orders@.... by adding text "[ORDER]" to subject and delivers to
director's mailbox. Director then sorts messages in his Outlook. He puts
every message that contains "[ORDERS]" in subject to separate folder.
Once a week he looks at that folder to find out what clients are active,
how many orders were placed, what goods are popular.


Someday a client sent very, very important order to MyCompany. Client
not only followed standard procedure and sent email to orders@..., but
also informed director about that order (the second recipient). So he
sent email to both addresses:

    orders@???; director@???


Everybody (administrator, director, client) expected, that director will
see the message. But a DISASTER happened! Director got message
containing "[ORDER]" in subject and Outlook moved that message in
separate folder. MyCompany failed to satisfy client.


Why this is so? Exim does two things:

-- copies messages to director by modifying subject (unseen)
-- delivers messages to all recipiens


This could look like this:

copy_orders_to_director:
driver = redirect
local_parts = orders
data = director
headers_remove = Subject
headers_add = Subject: [ORDERS] $bheader_Subject:
repeat_use = false
unseen = yes

After routing there are three addresses:

-- orders@....
-- director@... -- this is what client wanted
-- director@... -- with modified header, generated by redirection above

And exim deletes one of messages sent to director. This is not good in
my opinion. Director should get two messages -- the first one sent from
client, and the second one with "[ORDER]" in subject.