Another potential bug fix: running v1.7.0, I've noticed that mail fetcher produces an error whenever a bounced e-mail comes back to an e-mail address for which mail fetching is configured. This is a fairly common occurrence in our office, as we habitually put in "fake" tickets from a user with the domain "dev.null". Investigating the contents of the Ticket class, it seems like the error may not be expected behaviour, so I went ahead and made the following change (patch from TLD of osTicket installation; line numbers may, and probably will, vary):
--- support/include/class.mailfetch.php 2013-04-01 23.000000000 -0600
+++ support/include/class.mailfetch.php 2013-05-07 17.000000000 -0600
@@ -221,8 +222,10 @@
function getHeaderInfo($mid) {
- if(!($headerinfo=imap_headerinfo($this->mbox, $mid)) || !$headerinfo->from)
+ if(!($headerinfo=imap_headerinfo($this->mbox, $mid)))//
|| !$headerinfo->from)
return null;
+ if (!$headerinfo->from)
+ return array('mid' => $headerinfo->message_id);
$sender=$headerinfo->from;
//Just what we need...
Basically, MAILER-DAEMON messages on our server come back with an empty "from" string, so to force these through and allow them to get picked up at the call to isAutoBounce() further down the returned header info needs to contain at least the message ID.