LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Sendmail not using FQDN in HELO even though hostname setting is correct. (https://www.linuxquestions.org/questions/linux-server-73/sendmail-not-using-fqdn-in-helo-even-though-hostname-setting-is-correct-720725/)

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.

Code:

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

Code:

<<< 553 Bogus helo gandalf. <http://unblock.secureserver.net/?ip=>
When I telnet to the server in question port 25 I see the FQDN in the banner

Code:

220 gandalf.domain.com ESMTP Sendmail 8.13.8/8.12.11; Tue, 21 Apr 2009 11:20:59 -0700
/etc/sysconfig/network
Code:

NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=gandalf.domain.com

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

/etc/hosts
Code:

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1      gandalf.domain.com gandalf.domainukspellling.com gandalf localhost.localdomain localhost
#::1    localhost6.localdomain6 localhost6
xxx.xxx.xxx.xx      gandalf.domain.com gandalf.domainukspelling.com 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 sendmail.cf.
If sendmail cannot identify the domain name (lack of /etc/resolv.conf) you can use:
Code:

Dj$w.domain.com

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 = 'gandalf.domain.com'; resolved it.


All times are GMT -5. The time now is 11:37 PM.