New HeaderPromotionModeSettings property in Exchange Server 2007 SP2

With Exchange Server 2007 SP1 RU8 we disabled promotion of custom X-Headers to named properties when mail was submitted anonymously via SMTP. Only authenticated connections would work. With Exchange Server 2007 SP1 RU9 we disabled all named property promotion on messages submitted via SMTP, however Exchange Server 2007 SP2 introduced a new feature on the global TransportConfig object called HeaderPromotionModeSetting.

In Exchange Server 2007, this property supports two values:

  • NoCreate
  • MayCreate

Unfortunately at this time, the Exchange Server 2007 documentation for this feature found here was airlifted from the Exchange Server 2010 documentation and is not accurate. I'm working to get that rectified now.

NoCreate
This does just what it sounds like. We will NEVER create a named property under this condition. Similar to the behavior of Exchange Server 2007 SP1 RU9.

MayCreate
This options attempts to allow anonymous and authenticated mail submissions to have their X-Headers promoted to named properties. If we fail to promote, the message should be submitted anyway, hence "MayCreate". This will keep us from running into the previous behavior where messages could queue and/or ultimately NDR.

Impact
So what's the point of all this? Named properties are used for many thing, but a big impact for many is the use of named properties where POP and IMAP clients are concerned. Because Exchange Server 2007 does not keep the Mime for a message around, nor does it keep a full Mime Structure of the originally submitted messages, we will reconstruct the headers of a message when going through item (MAPI) to MIME conversion, IOW, when downloading a message via POP or IMAP.

If the X-Header on a message has never been promoted to a named property then it will not show up when RETRieving or FETCHing the message via POP or IMAP. Because the named property table is managed on a per database basis, once a named property has been promoted into a specific database it will always be provided to the POP/IMAP client.

Problems changing back to NoCreate
I wanted to edit this post because I've noticed that changing from NoCreate to MayCreate on Exchange Server 2007 results in the inability to change back to NoCreate. This has been bugged and scheduled to be released in a future rollup. instead it must be manually modified via AD using LDP, ADSIEDIT or your favorite AD modification tool.

This value is stored on the msExchTransportSettingsFlags property for the CN=Transport Settings, CN=<ORG NAME>, CN=Microsoft Exchange, CN=Services, CN=Configuration, CN=<DOMAIN> container. This is a bitwise flag that controls several different parameters. NoCreate and MustCreate are controlled by the 21st and 22nd bits. Once set to MayCreate, to set it back to NoCreate, you must subtract 3145728 from the current value.

Note: I *HIGHLY* suggest that you copy down the value of msExchTransportSettingsFlags down BEFORE you modify it, in lieu of any mistakes made in changing the value.