Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have MX records setup at and my domain is visible through

I am sending email via PHP PEAR Mail package.

This page claims I can change:

The value to give when sending EHLO or HELO. Default is localhost

As of right now, my email headers look like this:

Received: from ([] helo=localhost

What should they look like? I assume:


share|improve this question

2 Answers 2

up vote 2 down vote accepted

Cite from RFC 5321 Extended HELLO (EHLO) or HELLO (HELO)

The argument field contains the fully-qualified domain name of the SMTP client if one is available.

In other words it should be FQDN which resolves into IP address your sending from. So, if you are sending mail from IP and resolves into (and resolves back to you should use as HELO (EHLO).

share|improve this answer
That is, the external IP. – Matt Aug 29 '11 at 5:05
When I enter hostname I am shown: has address (AND newline) mail is handled by 0 so I should be using for my HELO then, yes? – darkAsPitch Aug 29 '11 at 21:40
You should first check what resolves to by issuing host (not hostname as above) and check if shown domain name resolves back to – AlexD Aug 30 '11 at 10:11
Hah woops, entered "hostname" and ended up revoking my WHM/cPanel licenses :S Don't try that at home, kids! host resolves to, since rDNS was setup to send email from that domain name. – darkAsPitch Aug 30 '11 at 20:11

Your HELO/EHLO name should be the system's fully-qualified domain name.

In the immortal words of RFC2821 (emphasis added):

These commands are used to identify the SMTP client to the SMTP server. The argument field contains the fully-qualified domain name of the SMTP client if one is available. In situations in which the SMTP client system does not have a meaningful domain name (e.g., when its address is dynamically allocated and no reverse mapping record is available), the client SHOULD send an address literal (see section 4.1.3), optionally followed by information that will help to identify the client system. The SMTP server identifies itself to the SMTP client in the connection greeting reply and in the response to this command.

(the "address literal" is the address in brackets ([]), or for v6 the address with an IPv6 prefix ([IPv6:fe80::1]))

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.