If you send an email and receive the following undeliverable "Delivery Final Failure Notice" with the following information: 

Reply from x.x.x.x: 504 5.5.2 &lt;<em>servername&gt;</em>: Helo command rejected: need fully-qualified hostname

Then follow this steps to resolve:

<!--more-->

1. Obtain an email address from the sender's domain having issues with sending the message and examine the message headers.
2. Scroll down and examine the "Received: from" line and play close attention to the server name and IP address

This is key and more than likely the issue. We need to ensure the server name and IP address matchup with the reverse DNS entry for the sending domain.

3. Perform a reverse <a href="http://remote.12dt.com/">DNS Lookup</a> on the IP address you find in the previous step. 
4. Ensure the server name in Step 2 matches up with Revese DNS entry from Step 3
5. If these do not match up, then you're on the right track. In my case going to the Trend Micro Interscan Messaging Security Suite (<a href="http://us.trendmicro.com/us/products/enterprise/interscan-messaging-security-suite/">IMSS</a>) Server was the next step.
6. On the IMSS server go to C:Program FilesTrend MicroIMSSconfig and edit the <strong>tsmtpd.ini</strong> file
7. Once the file is open, hit CTRL-F and search for <strong>helodomain</strong>, the entry we want to update is in Section 9.3
8. Remove the <strong>#</strong> sign and add in the reverse DNS entry we found (in Step 3)

Entry should look like this: HeloDomain=mail.yourdomain.com

9. Save the file, then go to the services and restart the Trend Micro IMSS SMTP Service, to put the recent changes into effect
10. Next circle back and redo step 1 with a new message, check the message headers and you should see the new helodomain change present
11. Resend the original message and you should no longer be receiving the the 504 5.5.5 HELO COMMAND REJECTED errors

Note: If you are not using Trend Micro's IMSS, then your steps will be different for correcting the helodomain. Be sure to check the admin guide for your system and correct as necessary.

