Code: Select all
503 AUTH command used when not advertised
Some debugging lead me to the '_send_mail' function in cacti/plugins/settings/include/mailer.php
I changed some code starting on line 749 in this file.
The original code was:
Code: Select all
/* Start SMTP conversation */
fputs($smtp_sock, "HELO " . $this->Config["Hostname"] . "\r\n");
$smtp_response = fgets($smtp_sock, 4096);
if (substr($smtp_response,0,3) != "250") {
$this->Error = "Error returned by SMTP host: " . $smtp_response;
fclose($smtp_sock);
return false;
}
Code: Select all
/* Start SMTP conversation */
fputs($smtp_sock, "EHLO " . $this->Config["Hostname"] . "\r\n");
$smtp_response = fgets($smtp_sock, 4096);
if (substr($smtp_response,0,3) != "250") {
$this->Error = "Error returned by SMTP host: " . $smtp_response;
fclose($smtp_sock);
return false;
}
while (trim($smtp_response) != "250 HELP") {
$smtp_response = fgets($smtp_sock, 4096);
}