• Welcome to Simple Machines Community Forum. Please login or sign up.
September 26, 2021, 11:03:02 AM

News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord


SMTP EHLO/HELO command wrong parameter

Started by digger, March 22, 2017, 04:26:36 PM

Previous topic - Next topic

digger

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
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;
}

digger



shawnb61

Thanks for the confirmation, moving to the fixed bugs board.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Advertisement: