Advertisement:

Author Topic: SMTP EHLO/HELO command wrong parameter  (Read 3779 times)

Offline digger

  • Sr. Member
  • ****
  • Posts: 786
  • Gender: Male
    • realdigger on GitHub
    • SMF Russian Community
SMTP EHLO/HELO command wrong parameter
« on: March 22, 2017, 04:26:36 PM »
Why EHLO/HELO command send $modSettings['smtp_host'] instead of the forum hostname (see RFC-5321)? I see a comment about this in the code (SMF 2.0.13) but it's still not fixed.


Subs-Post.php
Code: [Select]
if ($modSettings['mail_type'] == 1 && $modSettings['smtp_username'] != '' && $modSettings['smtp_password'] != '')
{
// !!! These should send the CURRENT server's name, not the mail server's!

// EHLO could be understood to mean encrypted hello...
if (server_parse('EHLO ' . $modSettings['smtp_host'], $socket, null) == '250')
{
if (!server_parse('AUTH LOGIN', $socket, '334'))
return false;
// Send the username and password, encoded.
if (!server_parse(base64_encode($modSettings['smtp_username']), $socket, '334'))
return false;
// The password is already encoded ;)
if (!server_parse($modSettings['smtp_password'], $socket, '235'))
return false;
}
elseif (!server_parse('HELO ' . $modSettings['smtp_host'], $socket, '250'))
return false;
}

Offline digger

  • Sr. Member
  • ****
  • Posts: 786
  • Gender: Male
    • realdigger on GitHub
    • SMF Russian Community
Re: SMTP EHLO/HELO command wrong parameter
« Reply #1 on: April 07, 2017, 10:28:09 AM »
What's up, doc?

Offline Fisch.666

  • Jr. Member
  • **
  • Posts: 207

Offline shawnb61

  • Dev. Team Mentor
  • Developer
  • SMF Hero
  • *
  • Posts: 3,116
    • sbulen on GitHub
Re: SMTP EHLO/HELO command wrong parameter
« Reply #3 on: January 02, 2020, 01:22:05 PM »
Thanks for the confirmation, moving to the fixed bugs board.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp