adding custom x-headers to outgoing emails
for 2003 event sinks, for 2007\2010 the replacement transport agents. Using x headers with exchange http://gsexdev.blogspot.com/2004/08/using-x-headers-with-exchange.html#!/2004/08/using-x-headers-with-exchange.html Adding an X-header in an Exchange Routing Transport Agent in Exchange 2007 http://gsexdev.blogspot.com/2007/09/adding-x-header-in-exchange-routing.html#!/2007/09/adding-x-header-in-exchange-routing.htmlJames Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com
July 25th, 2012 11:09am

I trying to add custom x-headers to outgoing emails for specific users in exchange organisation. Kindly let me know the steps for each exchange version 2003/2007/2010. Thanks for your help!
Free Windows Admin Tool Kit Click here and download it now
July 25th, 2012 11:09am

for 2003 event sinks, for 2007\2010 the replacement transport agents. Using x headers with exchange http://gsexdev.blogspot.com/2004/08/using-x-headers-with-exchange.html#!/2004/08/using-x-headers-with-exchange.html Adding an X-header in an Exchange Routing Transport Agent in Exchange 2007 http://gsexdev.blogspot.com/2007/09/adding-x-header-in-exchange-routing.html#!/2007/09/adding-x-header-in-exchange-routing.htmlJames Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com
July 25th, 2012 11:17am

Is there any manual way apart of writing a code?
Free Windows Admin Tool Kit Click here and download it now
July 25th, 2012 12:10pm

No there is no utility or alternative method. If only for specific users you can use an outlook com add in. http://ivasoft.com/James Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com
July 25th, 2012 2:02pm

Thanks James! This is for testing purpose so what if I want to add x-header for all the users who send email outside my organization. Is there manual way? Let me know it for all the Exchange versions.
Free Windows Admin Tool Kit Click here and download it now
July 25th, 2012 4:47pm

I just want to confirm the transport rule setting of "set header with value" is same as adding custom x-headers to the emails?
July 26th, 2012 3:24am

hi, Sorry for that, but i really want to know the meaning of manual way. If you want to add message header for some users, you can consider to use transport rule. You can do like this: Conditions:from a member of distribution list (you should create a DL and then add these users into the DL) sent to users inside or outside the organization(choose outside) Actions:set header with value (you can set header like this: x-test-messageheader and set value like this:test) It apply to exchange 2007 and exchange 2010. hope can help you thanks, CastinLu TechNet Community Support Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com
Free Windows Admin Tool Kit Click here and download it now
July 26th, 2012 3:37am

We are sending the journal report to external domains and with the transport rule settings, custom x-headers are getting added to the P2 message rather than the P1 envelop message. I am trying to know whether by modifying the transport agent code as mention in the below link, do the headers will get added to p1 message? http://gsexdev.blogspot.com/2007/09/adding-x-header-in-exchange-routing.html#!/2007/09/adding-x-header-in-exchange-routing.html
August 12th, 2012 9:42am

I would think so since its using the standard mime class, but I would post in the dev forum for confirmation. qmQueuedMessage.MailItem.Message.MimeDocument; MimeNode lhLasterHeader = hlHeaderlist.LastChildJames Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
August 12th, 2012 2:02pm

I really appreciate your help in resolving my issue. Have you got any confirmation yet, whether by modifying the transport agent code, headers will get add to P1 or P2 message?
August 14th, 2012 12:23pm

Please post in the dev forum, or moderator please move\merge to dev forum. http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/threadsJames Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
August 14th, 2012 3:52pm

I really appreciate your help in resolving my issue. Have you got any confirmation yet, whether by modifying the transport agent code, headers will get add to P1 or P2 message? By RFC, x-headers are P2. ( and I am referring to RFC 822- which has been superseeded by 2822 and 5322 and they dont mention x-headers, but I digress...)
August 14th, 2012 6:09pm

We are sending the journal report to external domains and with the transport rule settings, custom x-headers are getting added to the P2 message rather than the P1 envelop message. I am trying to know whether by modifying the transport agent code as mention in the below link, do the headers will get added to p1 message? http://gsexdev.blogspot.com/2007/09/adding-x-header-in-exchange-routing.html#!/2007/09/adding-x-header-in-exchange-routing.html These will allways be P2 headers and is exactly the same as the Rule Action. The P1 headers are used by the recieving MTA to route the message to the next destination. AFAIK the recipeint MTA builds the enevelope based on the SMTP Conversation verbs eg RCPT TO etc. While you could create your own P1 header values they would be only valid on the MTA where they where created (if your sending to a external server). The exception to the rule is when you have two Exchange servers talking to each other and using the XEXCH50 Verb to send extended message transport envelope properties. If you loop though the envelope headers in a Transport Agent via QueuedMessage.MailItem.Properties You'll see the differance between what headers are availble when processing different messages. Cheers Glen
Free Windows Admin Tool Kit Click here and download it now
August 15th, 2012 4:17am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics