Zero Hour Sleep
27May/101

Hub Transport Rule based on recipient’s domain

If you have played long enough with Hub Transport rules in Microsoft Exchange 2007 you might have noticed that they contain no flexible condition that applies on the recipient's address.

For whatever reason it is always assumed that the recipient is a user inside your organization and you won't find an easy way to implement the missed ToAddressContains predicate.

In this example I will show you how to build your own ToAddressContains predicate and create a Hub Transport Rule that will Blind Carbon Copy all emails sent to @domain.com to a specific mailbox, this mailbox will be called Alerts.

Microsoft Exchange 2007 up to SP1 Rollup update 8

If you are running any version of Exchange 2007 up to SP1 Rollup 8 create your transport rule by running the following from Exchange Management Shell.

Of course make sure to replace @domain.com and Alerts with the required values.

27Apr/102

Exclude hidden mailboxes from a Dynamic Distribution Group

Another interesting finding I made thanks to an Expert Exchange question I was involved with.

The question sounded pretty simply

I can create new dynamic distribution groups using powershell and the Exchange Console, but I cannot figure out how to filter the hidden mailboxes so they are not added.

I logically started by trying to use the msExchHideFromAddressLists attribute trying to get the list of mailboxes where it is set to false using the following powershell script to create the Dynamic Distribution List

New-DynamicDistributionGroup -Name "test" -OrganizationalUnit 'mydomain/Distribution Groups' -RecipientContainer mydomain -RecipientFilter { recipienttype -eq 'usermailbox' -and HiddenfromAddresslistsEnabled -eq $false}

But I was surprised to noticed it didn't work! It was actually returning only mailboxes the ones hidden from the address lists. There was something wrong in my OPATH query but wasn't able to find out what up front...

To double check I was not missing something I tried creating another DDG with the same command as above just with HiddenfromAddresslistsEnabled -eq $true and both groups where giving exactly the same results! Here is the full powershell command I used to create test1

New-DynamicDistributionGroup -Name "test1" -OrganizationalUnit 'mydomain/Distribution Groups' -RecipientContainer mydomain -RecipientFilter { recipienttype -eq 'usermailbox' -and HiddenfromAddresslistsEnabled -eq $true}

That was pretty weird !

14Apr/102

How to run Exchange .ps1 script as scheduled task

There are many reasons why one would like to run an Exchange powershell .ps1 script as a scheduled task.

In this post I will share with you how to achieve this on both Microsoft Exchange 2007 and Exchange 2010.

Obviously you should start by creating your .ps1 script for this article we will assume the script location is c:\pcs\YourScript.ps1

3Mar/101

Bug revealed in Dynamic Distribution Groups on Exchange 2007

I have been lately involved in a question on Experts-Exchange that turned into a very interesting adventure that led me to discover a bug in the Dynamic Distribution Groups on Exchange 2007.

I have tested the below on Exchange 2007 SP2 rollup 2 and the bug was still there, however I need to mention that tests also proved it was solved on Exchange 2010.

The Setup

First let me give you a very brief idea about the setup, for the lab I have setup an EBS server and created 2 mailboxes on it "John Doe" and "Jane Jackson".

Running Get-Recipient shows the 3 mailboxes in this organization

Taking a look at Active Directory Users and Computers also reveals that "John Doe" and "Jane Jackson" are located in the TestOu, the Administrator is located in the Users containter

The Plot

20Feb/101

Allow relaying on Exchange 2007 & Exchange 2010 in 4 easy steps

I have this application/website that needs to send emails, I have it configured to use our exchange server as SMTP. It can send emails to internal users however external ones are failing with a "550 5.7.1 Unable to relay" error

I have been answering this question, under different forms, so often on Experts Exchange lately that I have it copied on a notepad and end up by pasting it again every now and then.

First a mail server should be configure to unconditionally (not talking about spam/viruses here) accept emails sent to users in the smtp domains it serves. However it should be careful about who gets to send emails to other smtp domains using its services, that's what is called relaying.

This should explain why, in the above scenario, emails sent to internal users are received but not to external one. So for your application to be able to send external emails you should allow it (or its IP address) to relay emails through your exchange server and here is how to do it in Exchange 2007 and Exchange 2010.

21Jan/1013

Installing your first Exchange 2010 CAS or the truth about Exchange2003Url – Part 1

The Exchange2003Url is a new parameter in the Set-OwaVirtualDirectory cmdlet on Exchange 2010. Although Microsoft documentation clearly states that "The Exchange2003Url parameter specifies the Outlook Web App URL for Exchange 2003 mailboxes." It is all over the net that this parameter is also used to redirect requests to Exchange 2007 mailboxes!

I have no idea where this idea is coming from but I can assure you that is not the case.

Upgrading from Exchange 2003 to Exchange 2010

If you are upgrading from exchange 2003 you should know that an Exchange 2010 CAS cannot communicate directly with an Exchange 2003 mailbox. Thus you will need to publish at least 2 URLs one for your Exchange 2010 CAS and one for you Exchange 2003 Back End server or Front End server.

We will assume that https://owa.yourdomain.com/owa will point you to your exchange 2010 CAS server and https://ex2k3.yourdomain.com/exchange will give you access to your exchange 2003 back end or front end server.

By running, on your Exchange 2010 server,

Page 2 of 3123
Content Twitter

RSS Feed

RSS by email