Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

501 error trying to send external mail

Posted on 2007-11-23
6
1,443 Views
Last Modified: 2013-11-30
I've spent the last few days migrating off of Exchange 2003 to 2007 and shutting down the 2003 server. But now I'm having problems with sending email outbound.

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.

Anyway, I am at wit's end on this - any help would be greatly appreciated.  This was the same setup that worked fine before.


0
Comment
Question by:don_caruana
6 Comments
 
LVL 11

Expert Comment

by:bsharath
ID: 20342348
0
 
LVL 104

Expert Comment

by:Sembee
ID: 20342573
Firewall? Something doing SMTP scanning?
You said that you are using a smart host. What is the smart host? Another server on your network? A firewall, ISP?

Something is issuing that name, and it isn't an Exchange server.

Simon.
0
 
LVL 1

Author Comment

by:don_caruana
ID: 20342650
I followed the other thread, but DNS, nslookp, all that is working fine. Additionally, I don't think a firewall is doing this (although it's possible). I was actually able to send email to Gmail when I set up an MX-based connector (but nothing else).

The smarthost is my external mail server as above (mail.mydomain.com) at my external domain host.
0
 
LVL 1

Accepted Solution

by:
don_caruana earned 0 total points
ID: 20342916
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 to.

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, do 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.
0
 
LVL 1

Expert Comment

by:modus_operandi
ID: 20371133
Closed, 125 points refunded.
modus_operandi
EE Moderator
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Find out what you should include to make the best professional email signature for your organization.
As cyber crime continues to grow in both numbers and sophistication, a troubling trend of optimization has emerged over the last year.
In this video we show how to create an Accepted Domain in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Ac…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question