Skip to content

Commit

Permalink
Do not log specific errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jdarwood007 committed Aug 4, 2023
1 parent a108165 commit 4e32cde
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Sources/Subs-Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -1592,10 +1592,17 @@ function server_parse($message, $socket, $code, &$response = null)
if ($code === null)
return substr($server_response, 0, 3);

if (($server_code = substr($server_response, 0, 3)) != $code)
{
if ($server_code < 500 && !in_array($server_code, [450, 451, 421]))
$resonse_code = (int) substr($server_response, 0, 3);
if ($resonse_code != $code)
{
// Ignoreable errors that we can't fix should not be logged.
/*
* 550 - cPanel rejected sending due to DNS issues
* 450 - DNS Routing issues
*/
if ($resonse_code < 500 && !in_array($resonse_code, [450]))
log_error($txt['smtp_error'] . $server_response);

return false;
}

Expand Down

0 comments on commit 4e32cde

Please sign in to comment.