From df3a857744275a30e03cb58451317d43940037a4 Mon Sep 17 00:00:00 2001 From: stekkel Date: Wed, 21 Apr 2004 18:16:52 +0000 Subject: [PATCH] merge back from stable, rfc2821 fix. Fall back to HELO if EHLO is not supported. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7206 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- class/deliver/Deliver_SMTP.class.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/class/deliver/Deliver_SMTP.class.php b/class/deliver/Deliver_SMTP.class.php index f2e980ee..1aecdfab 100644 --- a/class/deliver/Deliver_SMTP.class.php +++ b/class/deliver/Deliver_SMTP.class.php @@ -85,7 +85,16 @@ class Deliver_SMTP extends Deliver { fputs($stream, "EHLO $helohost\r\n"); $tmp = fgets($stream,1024); if ($this->errorCheck($tmp,$stream)) { - return(0); + // fall back to HELO if EHLO is not supported + if ($this->dlv_ret_no == '500') { + fputs($stream, "HELO $helohost\r\n"); + $tmp = fgets($stream,1024); + if ($this->errorCheck($tmp,$stream)) { + return(0); + } + } else { + return(0); + } } if (( $smtp_auth_mech == 'cram-md5') or ( $smtp_auth_mech == 'digest-md5' )) { -- 2.25.1