Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In some SMTP server implementations (i.e. Postfix) you can enable Delivered-To and X-Original-To headers that will be added to your email. (or [X-]Envelope-To)

This is very helpful with distribution lists to determine which e-mail address the mail has been redirected to.

So, when the mail has been sent to distribute@example.com, you can see in the Delivered-To or Envelope-To header that it has been redirected (distributed) to xy@example.com, which is one of many other e-mail addresses that are linked to a single mailbox.

How do I find which address was used to deliver this mail to a specific mailbox on Microsoft Exchange 2010?

Looking at the plain message (with all headers) i can not find any information that the mail arrived via address xy@example.com

I think I need the Delivered-To header (or a similar one) to be set on Microsoft Exchange when a mail is delivered via distribution lists.

Is there any way to enable such header in Exchange 2010?

I need it so that our Ticket system (OTRS) correctly recognizes where the ticket belongs to. Adding all the e-mail addresses of all distribution lists to the system configuration is not the right solution.

And if there is a solution for Exchange 2010, is this possibly also applicable to Exchange 2007?

share|improve this question
4  
What particular version of Exchange? –  HopelessN00b Aug 26 '12 at 7:16
    
To Second HopelessN00b's question - What version of Exchange ? –  Sunny Chakraborty Aug 28 '12 at 13:07
    
@HopelessN00b assume 2010 –  Kaii Aug 31 '12 at 17:55
    
Does it matter which member of the group the Deliveredto header points to, for your OTRS –  fmysky Sep 1 '12 at 10:37
    
@fmysky yes, thats why i asked this question. there are several distrubution groups, where one of many otrs addresses is a member. I need to know which address exactly is member in the DL, so OTRS can filter the mail correctly and put it in the right queue. –  Kaii Sep 2 '12 at 12:49

4 Answers 4

If I am understanding the question correctly, here is a way to get the headers you want, but I bet you won't like it. It is based on transport rules.

If you can control the set of OTRS addresses and they can be registered in Exchange (as Exchange contacts, maybe) then you can make a transport rule for each of them as follows:

Apply rule to messages
sent to **OTRS Username**
and set X-Envelope-To with **xy@example.com**

As fmysky notes, the horrible thing about transport rules is that they take literal strings. So you would need a transport rule for each OTRS address (but you would not need one for every distribution list).

I tried this in my Exchange 2007 environment and it worked when I sent a message to one of our internal distribution lists.

share|improve this answer

I think that you'll find answer for your question here.

share|improve this answer
    
I don't think he will. An address rewrite is very different from a header designating the original recipient. –  HopelessN00b Aug 27 '12 at 11:38
    
I meant that he need to set 'Envelope From'(X-Envelope-From) and 'Envelope To'(X-Envelope-To) headers - then he will have the same functionality like Postfix. I know, I added wrong link, sorry for that. –  Dawid Meyer Aug 27 '12 at 12:28
    
By all means, feel encouraged to add the correct link, if there is one. I haven't been able to find a Microsoft link detailing valid Exchange headers with the functionality requested by Kaii, and would be somewhat interested in this myself. –  HopelessN00b Aug 27 '12 at 12:54
    
@japao you could help me greatly if you could provide information on how to activate these headers in exchange 2010 distribution lists. –  Kaii Sep 1 '12 at 7:54

You can add literal strings in custom headers through transport rules, but I believe the feature you want is not possible even with powershell. Unless you make your own transport agent.

share|improve this answer

You can get the original To: address, however once it goes into Exchange, you then can't tell what decisions were taken to get to the mailbox.

Unless you have nested distribution groups, this shouldn't be an issue as you can get the original To: address

If you are using nested distribution groups I would suggest moving to non nested distribution groups.

share|improve this answer
    
Actually, even without nesting we have a problem, as described in my question. A mail is sent to group@domain which then distributes to recipient-123@domain, which is resolved to be delivered to a specific mailbox. When fetching the mailbox, all OTRS can see is To: group@domain but what the filter rules are looking for is To: recipient-123@domain (<< this is what i need!). To resolve this we would have to add all known groups which include recipient-123 to the filter rules as well. But this is impossible because we're mostly never informed when the address is added to a group. –  Kaii Jan 9 '13 at 10:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.