Master Exchange 2007

powershell, automation & more…

Archive for November, 2009

Creating a custom DSN \ NDR message and associate with a transport rule in Exchange 2007

Posted by shauncroucher on November 10, 2009

On several occasions just lately I have been asked about how to setup a custom NDR and associate this with a transport rule.

It’s actually quite simple to achieve this using Transport Rules alone, but with the GUI, you only have enough space for a small sentence. That’s not always sufficient for the needs of the Exchange Administrator.

So, a quick how-to on creating a Delivery Status Notification to use as the “Send bounce message to sender with enhanced status code” Transport rule action.

1) You need to first setup a custom DSN using New-SystemMessage. The Custom DSN needs to have a status code  in the range 5.7.10 – 5.7.999

New-SystemMessage -DsnCode 5.7.100 -Language En -Internal $false  -Text “Your longer message goes here”

2) Setup a new Transport rule with the conditions of your liking and then for the transport rule action, don’t worry too much about the text field, as this will be displayed at the bottom of email, it will not form the mail text of the message. It is importan to make sure the Enhanced status code you enter on the rule  matches the custom DSN (in the example 5.7.100) code.

Voila! The End result is that the text found in the custom DSN will show to the user who gets trapped by the Transport Rule.

Shaun

References:

http://technet.microsoft.com/en-us/library/bb123506.aspx – Associating a DSN Message with a Transport Rule

http://technet.microsoft.com/en-us/library/aa998878.aspx – New-SystemMessage

Shaun

Advertisements

Posted in Transport | Leave a Comment »

Default Authentication Settings Exchange 2007 IIS Application & Virtual Directories

Posted by shauncroucher on November 9, 2009

You can find these settings in IIS7. Select each Virtual Directory and then IIS section –> Authentication. Listed are the VD’s that are enabled by default with a vanilla install of Exchange 2007.

Note these settings are from Exchange 2007 Standard SP2 Installation, but should be the correct settings for all versions of Exchange*.

printscreenofIISsettings

SSL Settings:

All the Virtual directories are set to Require SSL with 128bit except for OAB that DOES NOT require SSL and RpcWithCert which DOES NOT require 128bit (it DOES require SSL though).

* Unchecked on SBS 2008 at this time.

Shaun

Posted in Client Access | Leave a Comment »

Exchange 2007 and Windows 2008 R2

Posted by shauncroucher on November 5, 2009

Yesterday, Microsoft revealed that they are planning to release an update in the future to support Windows 2008 R2 as a platform to install Exchange 2007.

This is great news for many. Read the blog posting by the Exchange team here: http://msexchangeteam.com/archive/2009/11/04/453026.aspx

Shaun

Posted in Global\General | Leave a Comment »

Exchange 2007 Physical edb database size too large reduce size move mailbox offline defrag

Posted by shauncroucher on November 3, 2009

Ok,

There is a myth that the only way to deal with an oversized *PHYSICAL* edb file in Exchange 2007 is to run an online and then offline defrag.

This is not true. You can use the Move-Mailbox method on a new database to effecively reduce the size of the database holding your mailboxes. The great thing about this method is that neither an online OR an offline defrag is required, so you can achieve the desired effect on the spot, perhaps after deleting (or Disable-Mailbox’ing) a whole bunch of mailbox enabled users.

Whilst it is true that you will never change the physical size of a database without doing an offline defrag, you can deal with an oversized database by deleting it. Stay with me.

The method is as follows:

1) If you have deleted item retention configured on your Exchange 2007 server inform your users to check their ‘Recover Deleted Items’ using OWA or Outlook. This is the message dumpster location where deleted items get sent when they have been emptied. The items will remain accessible until the retension period has passed. The next step will make the Dumpster unavailable.

2) Create a new Storage Group and Database (you can just create a new database if you prefer, but it’s generally good practice to try keeping 1 database to 1 Storage group.

3) Use the Move-Mailbox cmdlet, or the Move Mailbox management shell facility to move ALL the mailboxes from the original oversized database to the new database.

4) If you are dropping the original database, once all mailboxes have been moved, restart the Microsoft System Attendant to ensure the system mailboxes get recreated

5) Remove the original database files and log files.

Voila. You now have a mailbox database that does not inclue the white space (mailboxes and deleted items in the dumpster) and you will be left with a mailbox database that is smaller than the original.

Note that this process also includes no downtime for the users and no risky offline defrag. Granted, offline defrag will normally run without causing a problem, but because it operates on the database page by page, there is a chance that data loss will occur. It is far far better to use this Move-Mailbox approach.

Move-Mailbox command syntax would be as follows:

Get-MailboxDatabse “Name of Mailbox Database” | Move-Mailbox -TargetDatabase “Name of Target Database” -confirm:$false

Shaun

Posted in Mailbox\Recipient | 2 Comments »

Microsoft support Exchange products

Posted by shauncroucher on November 2, 2009

Always worth keeping abreast of Microsoft support and product lifecycles.

This is where to find Microsoft product lifecycle information for Exchange 2007:

http://support.microsoft.com/lifecycle/search/Default.aspx?alpha=Exchange+Server

Shaun

Posted in Miscellaneous | Leave a Comment »