diff --git a/include/class.filter.php b/include/class.filter.php index a17962cf2e9c44e50f44c1b1f3571c3fd4eadd0c..ffdd76b1d3d4ed2ea68fea4dd6df20174416f475 100644 --- a/include/class.filter.php +++ b/include/class.filter.php @@ -866,6 +866,7 @@ class TicketFilter { $bounce_headers = array( 'From' => array('<MAILER-DAEMON@MAILER-DAEMON>', 'MAILER-DAEMON', '<>'), 'Subject' => array('DELIVERY FAILURE', 'DELIVERY STATUS', 'UNDELIVERABLE:'), + 'Return-Path' => '<>', ); foreach ($bounce_headers as $header => $find) { diff --git a/include/class.thread.php b/include/class.thread.php index 2fda4bcae682487687a6ea162a2f32454a82dd24..0151f8cf8482df8d21bf0d12119ef45da1a49c8f 100644 --- a/include/class.thread.php +++ b/include/class.thread.php @@ -377,7 +377,25 @@ Class ThreadEntry { } function isAutoResponse() { - return $this->getEmailHeader()?TicketFilter::isAutoResponse($this->getEmailHeader()):false; + static $autoresp; + + if (!isset($autoresp)) + $autoresp = $this->getEmailHeader() ? TicketFilter::isAutoResponse($this->getEmailHeader()) : false; + + return $autoresp; + } + + function isAutoBounce() { + static $autobounce; + + if (!isset($autobounce)) + $autobounce = $this->getEmailHeader() ? TicketFilter::isAutoBounce($this->getEmailHeader()) : false; + + return $autobounce; + } + + function isAutoReply() { + return ($this->isAutoResponse() || $this->isAutoBounce()); } //Web uploads - caller is expected to format, validate and set any errors.