501 error trying to send external mail (Full Version)

All Forums >> [Microsoft Exchange 2007] >> Message Routing


doncaruana -> 501 error trying to send external mail (23.Nov.2007 11:29:08 AM)

Been fighting with migrating servers all week including trying to move from Exchange2003 to Exchange2007.

I've got all the mailboxed migrated and went through the process of shutting down the old exchange 2003 server. All that seems to be okay (for now). The problem I am having is sending outbound mail.

I have a send connector, * is the name space and I have my smarthost configured (same way that worked with Ex2003) and I have the response setup to my external mail server's name. So, I have mydomain.local internally, but have mydomain.com externally. The external mail server's name is mail.mydomain.com and that's what's in the response page of the send connector - just like I had in 2003.

However, I don't even think emails are getting that far. Everytime I try to send an email externally, it fails nearly immediately and I get this message:

The following organization rejected your message: home.

followed by 'diagnostic information'

home #501 Your domain does not seem to be valid. Could not find MX record for your domain. ##

I have no clue what 'home' is on my network.

What I've been doing is bringing up another DNS/AD domain controller, which is now the PDC (this is Win2k3 R2). So the new box has AD, DNS, and Exchange 2007 on it (yes I know - not recommended).

Anyway, I am at wit's end on this - any help would be greatly appreciated.


doncaruana -> RE: 501 error trying to send external mail (24.Nov.2007 10:41:10 AM)

Looks like I answered my own question, but I'll post what I ended up doing here for others.

I made sure all the tracing I could turn on was turned on, including the connectivity log (which needs to be done in the shell : set-transportserver -identity <server> -ConnectivityLogEnabled $true).

Looking there (C:\Program Files\Microsoft\Exchange Server\TransportRoles\Logs\Connectivity, by default), I could see that the messages were getting to my external mail server (my smarthost). Looking over at the message tracking log (C:\Program Files\Microsoft\Exchange Server\TransportRoles\Logs\MessageTracking), I saw that my smarthost was actually rejecting my e-mails because the reply-to address was set to my local domain! (me@mydomain.local, vs me@mydomain.com).

There are two ways to do this, depending on your organization.

You can go to each individual mail box and set the reply to address to your external domain name. But in order to do this, you need to uncheck "Automatically update e-mail addresses based on recipient policy". But there's an easier way to do it, but it's complicated too.

First, you have to set up an accepted domain that matches your external domain (mydomain.com). I already had one that was mydomain.local. The key here is that you have to say it's an internal relay domain (even though the option says that's for another AD in the forest). Once you've done that, go to the email address policies.

The trick in email address policies is that little dropdow arrow next to 'Add'. That allows you to create a custom address. Once you get in there you can use an 'alias'. The parameters are:
%g - Used for given name (first name); %i - Used for middle initial; %s - Used for surname (last name); %d - Used for display name; %m - Used for Exchange alias; %xs - Uses the x number of letters of the surname. For example if x=2, then the first two letters of the surname are used.; %xg - Uses the x number of letters of the given name. For example, if x=2, then the first two letters of the given name are used.

Anyway, type in the alias - in my case it's %m@mydomain.com, set that as your reply and apply the policy and voila!! Problem solved.

Page: [1]