Skip to content
Snippets Groups Projects
Commit 8eda7e38 authored by Jared Hancock's avatar Jared Hancock
Browse files

Log errors on email loop detection

If an email loop is detected, in addition to dropping the message, also log
an error to the system log, but do not send an email to the administrator in
the event that it is the administrator's email that is looped.
parent 15c6f5a7
No related branches found
No related tags found
No related merge requests found
......@@ -600,6 +600,8 @@ Class ThreadEntry {
* - body - (string) email message body (decoded)
*/
function postEmail($mailinfo) {
global $ost;
// +==================+===================+=============+
// | Orig Thread-Type | Reply Thread-Type | Requires |
// +==================+===================+=============+
......@@ -628,6 +630,15 @@ Class ThreadEntry {
// This mail was sent by this system. It was received due to
// some kind of mail delivery loop. It should not be considered
// a response to an existing thread entry
if ($ost) $ost->log(LOG_ERR, 'Email loop detected', sprintf(
'It appears as though <%s> is being used as a forwarded or
fetched email account and is also being used as a user /
system account. Please correct the loop or seek technical
assistance.', $mailinfo['email']),
// This is quite intentional -- don't continue the loop
false,
// Force the message, even if logging is disabled
true);
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment