From c9fa2dee2a9da0fccc67788eef128d5e0982ae4f Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Tue, 9 Dec 2014 12:04:10 +0800 Subject: [PATCH] MDL-48164 mod_forum: Add additional headers to prevent OOF replies This adds the X-Auto-Response-Suppress header to outbound messages. --- mod/forum/lib.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/mod/forum/lib.php b/mod/forum/lib.php index bef85967a28..40633b7ef08 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -735,12 +735,16 @@ function forum_cron() { $userfrom->customheaders = array ( // Headers to make emails easier to track. - 'Precedence: Bulk', 'List-Id: "' . $cleanforumname . '" id . '@' . $hostname.'>', 'List-Help: ' . $CFG->wwwroot . '/mod/forum/view.php?f=' . $forum->id, 'Message-ID: ' . forum_get_email_message_id($post->id, $userto->id, $hostname), 'X-Course-Id: ' . $course->id, - 'X-Course-Name: ' . format_string($course->fullname, true) + 'X-Course-Name: ' . format_string($course->fullname, true), + + // Headers to help prevent auto-responders. + 'Precedence: Bulk', + 'X-Auto-Response-Suppress: All', + 'Auto-Submitted: auto-generated', ); if ($post->parent) { @@ -1055,7 +1059,12 @@ function forum_cron() { } } - $userfrom->customheaders = array ("Precedence: Bulk"); + // Headers to help prevent auto-responders. + $userfrom->customheaders = array( + "Precedence: Bulk", + 'X-Auto-Response-Suppress: All', + 'Auto-Submitted: auto-generated', + ); $maildigest = forum_get_user_maildigest_bulk($digests, $userto, $forum->id); if ($maildigest == 2) {