Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

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 domain.com ([12.34.56.78] helo=localhost

What should they look like? I assume:

helo=domain.com

???

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

Cite from RFC 5321 4.1.1.1. 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 12.34.56.78 and mail.domain.com resolves into 12.34.56.78 (and 12.34.56.78 resolves back to mail.domain.com) you should use mail.domain.com as HELO (EHLO).

share|improve this answer
    
That is, the external IP. –  Matt Aug 29 '11 at 5:05
    
When I enter hostname domain.com I am shown: domain.com has address 12.34.56.78 (AND newline) domain.com mail is handled by 0 domain.com so I should be using domain.com for my HELO then, yes? –  darkAsPitch Aug 29 '11 at 21:40
    
You should first check what 12.34.56.78 resolves to by issuing host 12.34.56.78 (not hostname as above) and check if shown domain name resolves back to 12.34.56.78. –  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 12.34.56.78 resolves to domain.com, since rDNS was setup to send email from that domain name. –  darkAsPitch Aug 30 '11 at 20:11
add comment

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 ([192.0.2.1]), or for v6 the address with an IPv6 prefix ([IPv6:fe80::1]))

share|improve this answer
add comment

Your Answer

 
discard

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.