10

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?

sysadmin1138
  • 131,083
  • 18
  • 173
  • 296
Kaii
  • 735
  • 1
  • 6
  • 17

3 Answers3

2

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.

Paul Nijjar
  • 102
  • 2
  • 10
0

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.

fmysky
  • 94
  • 6
0

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.

shouldbeq931
  • 509
  • 4
  • 15
  • 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 09 '13 at 10:02