Bobcares

How to fix email error ‘501 5.1.7 invalid address’ in Exchange servers

by | Sep 20, 2016

A commonly noted error in Microsoft Exchange 2007 server is when the emails from certain 3rd party applications or scripts fail to deliver.

The mails get rejected, giving this error message in the logs:

SMTP MAIL command failed Error (501) 5.1.7 Invalid address

Today, we’ll see what this error means and how to fix it in Exchange server.

Are you facing email errors in your site?

CLICK HERE TO FIX YOUR MAILS

 

What is error ‘501 5.1.7 invalid address’?

As we all know, a valid email address has the format – user@domain.com. But in many email applications, people give the alias names in mail address fields – say, just ‘username’.

In older versions of Exchange, the default domain name gets appended automatically to these alias entries given in ‘MAIL FROM:’ or ‘RCPT TO:’ fields of email applications.

So, even if aliases are used, they get automatically converted to fully qualified email addresses by the Exchange server. But from Exchange 2007 onwards, this feature is absent.

So, when mail users try to send a mail with just an alias name, Exchange 2007 DOES NOT replace it with the full mail address, and it results in  ‘501 5.1.7 invalid address’ error.

[ You don’t have to lose your sleep over lost emails. Get our professional help to fix your mail errors. ]

How to fix email error ‘501 5.1.7 invalid address’

To resolve the mail delivery error ‘501 5.1.7 invalid address’, the solution is to ensure that all the email addresses in the applications are in the proper format.

Since its not practically feasible to edit all existing applications and update the ‘MAIL FROM’ and ‘RCPT TO’ fields manually, an easier way is to set a default domain name for Exchange.

So, if you’re using Microsoft Exchange mail server 2007 or above and it is rejecting emails with the error ‘501 5.1.7 invalid address’, here is the fix:

The ‘DefaultDomain’ parameter specifies the domain name to append to aliases given in the ‘MAIL FROM’ or ‘RCPT TO’ fields for emails sent from applications.

The steps to set the default domain value on the receive connector are:

1. Access Microsoft Exchange Server 2007 and click on the Exchange Management Shell.

2. Verify the current setting of the default domain value on the receive connector using this command:

Get-ReceiveConnector -identity <ReceiveConnectorName>|fl

The value of DefaultDomain that is shown in the output would be blank by default.

3. Set the default domain value to the main domain name you want to append to the email aliases, using the command:

Set-ReceiveConnector -identity “<ReceiveConnectorName>” -DefaultDomain “<DomainName>”

Now this domain name would be appended to the email addresses in the applications that sent mail to or relay mails via this mail server, causing them to deliver fine.

[ Need help resolving email errors in your sites? Get assistance from our server experts to fix your website. ]

In short..

For email applications, its always good practice to use fully qualified email addresses for sender and recipient fields. This would help avoid email spoofing and mail bounces.

Too many instances of error message ‘501 5.1.7 invalid address’ in the mail logs can also denote spamming in the server via some malicious scripts.

Securing the mail server and the email applications is very crucial to avoid spamming and blacklisting of the servers, and to ensure successful mail delivery.

If you’d like to know how to secure your mail server and prevent email bounce errors, we’d be happy to talk to you.

[ Are your users complaining about email errors? Get our server specialists’ assistance to fix your mail server. ]

 

 

Getting intermittent email errors?

No more delayed or undelivered emails. We'll fix your email errors in no time.

Click Now to resolve your email errors

var google_conversion_label = "Blp0CLCojHIQ0aD71QM";

4 Comments

  1. Alex Ryan

    Awesome article! It is in detail and well formatted that i enjoyed reading. which in turn helped me to get new information from your blog.

    Reply
  2. john smith

    thanks for the information provided by you it’s really a great help from your side

    Reply
  3. huluactivate

    This is a really helpful post, very informative there is no doubt about it. Thanks for sharing this information with us. I really appreciate your work.

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF