LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Forcing sendmail to use HELO (https://www.linuxquestions.org/questions/linux-server-73/forcing-sendmail-to-use-helo-674976/)

the_gripmaster 10-08-2008 01:49 AM

Forcing sendmail to use HELO
 
My MX server is trying to send email to @itcbd.com but every time it is failing as it is first trying to EHLO and is being greeted with the following error message:

Code:

402 4.5.2 Error: command not recognized
It is obvious that the MX server for the @itcbd.com does not implement the EHLO command. For some reason, my MX server is not trying HELO after encountering the error message. I am using sendmail version 8.13.8. Is there any remedy?

MX servers for @google.com also does not implement the EHLO command, but my MX server manages to revert to using HELO and send emails to @google.com without any issue.

Is there any way I can instruct sendmail to use HELO by default?

Mr. C. 10-08-2008 02:00 AM

I think you are getting confused or are misunderstanding.

An MX is for clients to determine how to send mail. So your Sendmail system is an MX in the receiving aspect. For sending mail, it is an SMTP client or MTA.

Both domains you indicate accept EHLO:

Code:

$ host itcbd.com
itcbd.com has address 116.212.108.236
itcbd.com mail is handled by 10 mx-in-01.telnet-bd.com.

$ telnet mx-in-01.telnet-bd.com 25
Trying 116.212.104.91...
Connected to mx-in-01.telnet-bd.com.
Escape character is '^]'.
220 mx-in-01.telnet-bd.com ESMTP server of Telnet Communication Limited (Telnet). Sending Unsolicited Commercial or Bulk E-mail or SPAM to/from TELNET Computer Network is Strictly Prohibited. Any Attempt Of This Type Of Abuse Will Cause From Termination Of Network Connectivity Up To Activity Of Law Enforcement Agencies.
EHLO example.com
250-fortune-01.telnet-bd.com
250-PIPELINING
250-SIZE 20480000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
quit
221 2.0.0 Bye
Connection closed by foreign host.

$ host google.com
google.com has address 72.14.207.99
google.com has address 209.85.171.99
google.com has address 64.233.187.99
google.com mail is handled by 10 smtp3.google.com.
google.com mail is handled by 10 smtp4.google.com.
google.com mail is handled by 10 smtp1.google.com.
google.com mail is handled by 10 smtp2.google.com.

$ telnet smtp3.google.com 25       
Trying 64.233.183.25...
Connected to smtp3.google.com.
Escape character is '^]'.
220 smtp.google.com ESMTP
EHLO example.com
250-smtp.google.com Hello mail.sample.net [10.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE 20000000
250-STARTTLS
250-DELIVERBY
250 HELP
quit
221 2.0.0 smtp.google.com closing connection
Connection closed by foreign host.

Looks like EHLO is supported to me!

the_gripmaster 10-08-2008 02:11 AM

Thanks for helping me get the terms right. EHLO does not work from my end:

Code:

[root@mx2 ~]# telnet smtp3.google.com 25
Trying 64.233.183.25...
Connected to smtp3.google.com (64.233.183.25).
Escape character is '^]'.
220 smtp.google.com ESMTP
EHLO example.com
500 5.5.1 Command unrecognized: "XXXX example.com"
quit
221 2.0.0 smtp.google.com closing connection
Connection closed by foreign host.
[root@mx2 ~]# telnet mx-in-01.telnet-bd.com 25
Trying 116.212.104.91...
Connected to mx-in-01.telnet-bd.com (116.212.104.91).
Escape character is '^]'.
220 mx-in-01.telnet-bd.com ESMTP server of Telnet Communication Limited (Telnet). Sending Unsolicited Commercial or Bulk E-mail or SPAM to/from TELNET Computer Network is Strictly Prohibited. Any Attempt Of This Type Of Abuse Will Cause From Termination Of Network Connectivity Up To Activity Of Law Enforcement Agencies.
EHLO example.com
402 4.5.2 Error: command not recognized
quit
221 2.0.0 Bye
Connection closed by foreign host.
[root@mx2 ~]# telnet mx-in-01.telnet-bd.com 25
Trying 116.212.104.91...
Connected to mx-in-01.telnet-bd.com (116.212.104.91).
Escape character is '^]'.
220 mx-in-01.telnet-bd.com ESMTP server of Telnet Communication Limited (Telnet). Sending Unsolicited Commercial or Bulk E-mail or SPAM to/from TELNET Computer Network is Strictly Prohibited. Any Attempt Of This Type Of Abuse Will Cause From Termination Of Network Connectivity Up To Activity Of Law Enforcement Agencies.
HELO example.com
250 fortune-01.telnet-bd.com
quit
221 2.0.0 Bye
Connection closed by foreign host.
[root@mx2 ~]#


Mr. C. 10-08-2008 02:15 AM

There is some firewall or SMTP proxy in the way stripping the EHLO and replacing it with XXXX. Can you disable this borked appliance?

the_gripmaster 10-08-2008 03:07 AM

@Mr. C.

Thanks a lot!!!

Our Internet Gateway router was only allowing "RFC 821 SMTP commands". I have managed to fix it.


All times are GMT -5. The time now is 12:07 AM.