Wednesday, July 25, 2012

MessagingException: 501 HELO requires domain address

Solution:

 Dump out the response from executing: InetAddress.getLocalHost().getHostName()

 the host name that was returned did not exist in the /etc/hosts file
So I added the unknown hostname into the hosts file and it worked.

Apparently, Java will use the hostname as configured in /etc/sysconfig/network or /etc/sysconfig/systemid

 

Reference:

http://www.oracle.com/technetwork/java/faq-135477.html#helo

2 comments: