-   Linux - Server (
-   -   Sendmail not using FQDN in HELO even though hostname setting is correct. (

Jukas 04-21-2009 01:42 PM

Sendmail not using FQDN in HELO even though hostname setting is correct.
I'll start with the prefix warning that I've very unfamiliar with sendmail, I personally run and prefer postfix, but my new job uses sendmail for all their mailservers.

We have 3 sendmail servers, (1 primary and 2 that handle outgoing email) and one of them is not sending a FQDN during the HELO process. I've already searched and double checked against every solution I've seen posted so I'm hoping someone can suggest something I may have missed.

Here is what I'm seeing in remote logs when I test email.


Apr 21 11:27:13 nix postfix/smtpd[22176]: <[]: HELO gandalf
and I'm also seeing bounce back emails containing info like:


<<< 553 Bogus helo gandalf. <>
When I telnet to the server in question port 25 I see the FQDN in the banner


220 ESMTP Sendmail 8.13.8/8.12.11; Tue, 21 Apr 2009 11:20:59 -0700


and both uname -a and the hostname command show the FQDN


# Do not remove the following line, or various programs
# that require network functionality will fail. gandalf localhost.localdomain localhost
#::1    localhost6.localdomain6 localhost6 gandalf

These settings are identical to two other sendmail servers and this is the only one not sending a FQDN in a helo statement. I'd greatly appreciate if anyone could tell me why this server is misbehaving as the primary sysadmin who is very familiar with sendmail is out this week.

bathory 04-21-2009 03:39 PM

Check the Dj variable in the working and not working
If sendmail cannot identify the domain name (lack of /etc/resolv.conf) you can use:


Jukas 04-21-2009 09:39 PM

Thanks for the suggestion but in further testing I narrowed the problem down a php script and not the mail server itself (normal email had the correct ehlo, script generated email didn't). I'm not sure why sendmail allowed it, but a variable of $mail_server = 'gandalf'; was causing the problem. Changing it to $mail_server = ''; resolved it.

All times are GMT -5. The time now is 01:39 AM.