We have recently been encountering an occasional problem when osTicket automatically processes emails from an imap mailbox on our mail server. For these problem emails, when calling include/class.mailfetch.php.getHeaderInfo the php method imap_headerinfo() returns a php object which does not include any 'From' details. This causes osTicket to raise the "Excessive errors processing emails" error and prevents a ticket from being automatically created.I have implemented a workaround based on the suggestion in the php documentation here. If imap_headerinfo fails to provide 'From' information, instead I call imap_rfc822_parse_headers(imap_fetchheader($this->mbox, $mid)) . This fixes the problem. Can anyone advise me if this isa) a bug on osTicket, which should be raisedorb) a problem with our mail server providing incorrectly configured headers?A week ago we upgraded our mail server from Zarafa 7.2 to Kopano 8 (based I think on Zarafa 7.2.3) and this has only been occurring since then. Thanks.osTicket versions etc:osTicket Version

v1.9.14 (8b927a0)

Upgrade

— v1.9.15 is available

Web Server Software

Apache/2.4.7 (Ubuntu)

MySQL Version

5.5.52

PHP Version

5.5.9-1ubuntu4.21Here is the header of an email which fails to provide correct headers:Return-Path:

Received: from localhost () by zeus.comm-tech.org (kopano-dagent)

with LMTP for ; Wed, 15 Mar 2017 18 +0000

Received: from localhost (localhost ) by zeus.comm-tech.org

(Postfix) with ESMTP id 4429D8054742 for ; Wed, 15

Mar 2017 18 +0000

Received: from zeus.comm-tech.org () by localhost

(zeus.comm-tech.org ) (amavisd-new, port 10024) with ESMTP id

XR12h3m5CIQr for ; Wed, 15 Mar 2017 18 +0000

Received: from localhost (localhost ) by zeus.comm-tech.org

(Postfix) with ESMTP id 0631E805474A for ; Wed, 15

Mar 2017 18 +0000

Received: from musashi.comm-tech.org (musashi.comm-tech.org )

by zeus.comm-tech.org (Postfix) with ESMTPS id CBC878054742 for

; Wed, 15 Mar 2017 18 +0000

Received: from localhost (localhost.localdomain ) by

musashi.comm-tech.org (Postfix) with ESMTP id 3vk0Kv4KjZz1y5D for

; Wed, 15 Mar 2017 18 +0000

Received: from musashi.comm-tech.org () by localhost

(musashi.comm-tech.org ) (amavisd-new, port 10024) with LMTP id

g4dlx3Z3PXyX for ; Wed, 15 Mar 2017 18 +0000

Received: from a10-71.smtp-out.amazonses.com (a10-71.smtp-out.amazonses.com

) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256

bits) ) (No client certificate requested) by musashi.comm-tech.org

(Postfix) with ESMTPS id 3vk0KY3pmdz1yVY for ; Wed,

15 Mar 2017 18 +0000

Subject: =?utf-8?Q?A_new_dropbox=2Ecom_is_coming_soon=E2=80=94here=27s_wha?=

=?utf-8?Q?t_you_need_to_know?=

From: =?utf-8?Q?Dropbox?=

To: =?utf-8?Q?Comm-Tech_Support?=

Date: Wed, 15 Mar 2017 18 +0000

Mime-Version: 1.0

Content-Type: multipart/alternative;

boundary="=_x2iQeQfOy8qnLoSfFupj0xZ707BH0hhu1n78E7J4opJAFJyd"

X-Virus-Scanned: Scrollout F1 at comm-tech.org

X-Spam-Flag: NO

X-Spam-Score: -3.511

X-Spam-Level:

X-Spam-Status: No, score=-3.511 tagged_above=-1000 required=4.5

tests= autolearn=ham

autolearn_force=no

X-Ses-Outgoing: 2017.03.15-54.240.10.71

X-Dropbox-Message-Id: 12188999829150348713

Message-Id:

<0100015ad33389ac-97f525d8-1d6f-44ce-a3b9-cc1ca75732aa-000000@email.amazonses.com>

This is a multi-part message in MIME format. Your mail reader does not

understand MIME message format.

--=_x2iQeQfOy8qnLoSfFupj0xZ707BH0hhu1n78E7J4opJAFJyd

Content-Type: text/plain; charset=utf-8

Content-Transfer-Encoding: quoted-printable

object returned by imap_headerinfo():array(

'date' => 'Wed, 15 Mar 2017 18 +0000',

'Date' => 'Wed, 15 Mar 2017 18 +0000',

'Recent' => ' ',

'Unseen' => ' ',

'Flagged' => 'F',

'Answered' => ' ',

'Deleted' => ' ',

'Draft' => ' ',

'Msgno' => ' 1',

'MailDate' => '15-Mar-2017 18 +0000',

'Size' => '10954',

'udate' => 1489602054,

)

Object returned by imap_rfc822_parse_headers(imap_fetchheader($this->mbox, $mid)):

array(

'date' => 'Wed, 15 Mar 2017 18 +0000',

'Date' => 'Wed, 15 Mar 2017 18 +0000',

'subject' => '=?utf-8?Q?A_new_dropbox=2Ecom_is_coming_soon=E2=80=94here=27s_wha?= =?utf-8?Q?t_you_need_to_know?=',

'Subject' => '=?utf-8?Q?A_new_dropbox=2Ecom_is_coming_soon=E2=80=94here=27s_wha?= =?utf-8?Q?t_you_need_to_know?=',

'message_id' => '',

'toaddress' => '=?utf-8?Q?Comm-Tech_Support?= ',

'to' =>

array (

0 =>

stdClass:(array(

'personal' => '=?utf-8?Q?Comm-Tech_Support?=',

'mailbox' => 'support',

'host' => 'comm-tech.org',

)),

),

'fromaddress' => '=?utf-8?Q?Dropbox?= ',

'from' =>

array (

0 =>

stdClass:(array(

'personal' => '=?utf-8?Q?Dropbox?=',

'mailbox' => 'no-reply',

'host' => 'dropboxmail.com',

)),

),

'reply_toaddress' => '=?utf-8?Q?Dropbox?= ',

'reply_to' =>

array (

0 =>

stdClass:(array(

'personal' => '=?utf-8?Q?Dropbox?=',

'mailbox' => 'no-reply',

'host' => 'dropboxmail.com',

)),

),

'senderaddress' => '=?utf-8?Q?Dropbox?= ',

'sender' =>

array (

0 =>

stdClass:(array(

'personal' => '=?utf-8?Q?Dropbox?=',

'mailbox' => 'no-reply',

'host' => 'dropboxmail.com',

)),

),

)

Looks like this has already been reported, I'll take it up on github.https://github.com/osTicket/osTicket/issues/850https://github.com/osTicket/osTicket/pull/2126

It looks to me like you linked the solution......This pull request:https://github.com/osTicket/osTicket/pull/2126

Yep, looks quite stale but hopefully it'll get merged in. Thanks.

Write a Reply...