Book Image

Microsoft Exchange 2010 PowerShell Cookbook

Book Image

Microsoft Exchange 2010 PowerShell Cookbook

Overview of this book

Table of Contents (22 chapters)
Microsoft Exchange 2010 PowerShell Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Working with custom DSN messages


Delivery Status Notification (DSN) messages are system messages generated by transport servers that inform the sender of a message about its status. When a message cannot be delivered to a recipient, Exchange will respond to the sender with a message that is associated with a status message. Sometimes, these status messages may not be detailed enough for your liking. In those cases, you can create new messages associated with the DSN code to provide more details to the sender. This is something that has to be done from the Exchange Management Shell.

How to do it...

You can use the New-SystemMessage cmdlet to create a custom DSN message:

New-SystemMessage -DSNCode 5.1.1 `
-Text "The mailbox you tried to send an e-mail message to 
does not exist. Please contact the Help Desk at extension 
4112 for assistance." `
-Internal $true `
-Language En

In this example, a Non Delivery Report (NDR) with the custom DSN message will be delivered to senders that try to send messages...