diff --git a/include/class.filter.php b/include/class.filter.php index 70a5f27180c480382107a5c35e0249de49826a30..7cfca2905c61cc22555c1a51fd8b9cfe7f77976e 100644 --- a/include/class.filter.php +++ b/include/class.filter.php @@ -905,7 +905,7 @@ class TicketFilter { $bounce_headers = array( 'From' => array('stripos', - array('MAILER-DAEMON', '<>'), null, false), + array('MAILER-DAEMON', '<>', 'postmaster@'), null, false), 'Subject' => array('stripos', array('DELIVERY FAILURE', 'DELIVERY STATUS', 'UNDELIVERABLE:', 'Undelivered Mail Returned'), 0), diff --git a/include/class.ticket.php b/include/class.ticket.php index 1c9b8dda3c8be9802aad1d8cdfb30734c8ad8d1c..e64c38f40a34cc8ec1a6962db411fc4126bc2ad2 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -1807,20 +1807,22 @@ class Ticket { } } - if(!$alerts) return $message; //Our work is done... - // Do not auto-respond to bounces and other auto-replies - $autorespond = isset($vars['flags']) - ? !$vars['flags']['bounce'] && !$vars['flags']['auto-reply'] - : true; - if ($autorespond && $message->isAutoReply()) - $autorespond = false; + if ($alerts) + $alerts = isset($vars['flags']) + ? !$vars['flags']['bounce'] && !$vars['flags']['auto-reply'] + : true; + if ($alerts && $message->isBounceOrAutoReply()) + $alerts = false; - $this->onMessage($message, $autorespond); //must be called b4 sending alerts to staff. + $this->onMessage($message, $alerts); //must be called b4 sending alerts to staff. - if ($autorespond && $cfg && $cfg->notifyCollabsONNewMessage()) + if ($alerts && $cfg && $cfg->notifyCollabsONNewMessage()) $this->notifyCollaborators($message, array('signature' => '')); + if (!$alerts) + return $message; //Our work is done... + $dept = $this->getDept();