I use a custom winsock based dll for sending emails out of our application. As per RFC 821 Section 3.5
HELO Command: RFC-821 Section 3.5
The sender-SMTP MUST ensure that the parameter in a HELO command is a valid principal host domain name for the client host. As a result, the receiver-SMTP will not have to perform MX resolution on this name in order to validate the HELO parameter.
The HELO receiver MAY verify that the HELO parameter really corresponds to the IP address of the sender. However, the receiver MUST NOT refuse to accept a message, even if the sender's HELO command fails verification.
DISCUSSION: Verifying the HELO parameter requires a domain name lookup and may therefore take considerable time. An alternative tool for tracking bogus mail sources is suggested below (see "DATA Command").
Note also that the HELO argument is still required to have valid syntax, since it will appear in a Received: line; otherwise, a 501 error is to be sent
However sometimes on few email servers I get
Failed: 501 missing fully qualified domain name
I always pass( atleast try to ) "domain.com" as the parameter where domain.com is extracted from the reply to address.
So am I interpreting this wrong, what are the possible reasons for this error.