Jump to content

Outgoing SMTP HELO/EHLO is incorrect, causing rejection of all emails

Recommended Posts

Posted (edited)


When using an external SMTP server, Invision sends the domain name of the SMTP SERVER in the HELO/EHLO commands, instead of the CLIENT (i.e. the server Invision is running on).

This is incorrect and violates the SMTP standard (RFC 2821), which says:

Quote  Extended HELLO (EHLO) or HELLO (HELO)

   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.

This information -- the domain name of the server Invision is running on -- is readily available, for example, from the license key URL.

Here's the incorrect code in Smtp.php, with HELO/EHLO being sent with the SMTP server's name ($this->smtpHost)

		/* HELO/EHLO */
			$helo = 'EHLO';
			$responseCode = $this->_sendCommand( 'EHLO ' . $this->smtpHost, 250 );


			/* Exchange server (at least) wants EHLO resending for STARTTLS */
			$this->_sendCommand( $helo . ' ' . $this->smtpHost, 250 );


This is causing mail servers to reject outbound mail (error 550).

Please fix this asap. Happy to provide more logs/information if needed.

Edited by taxmama
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...