Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

'from' field not retrieved from imap headers, "Excessive errors processing emails"

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 is

a) a bug on osTicket, which should be raised
or
b) 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.21
Here is the header of an email which fails to provide correct headers:

Return-Path: <srs0=2dsq=2y=email.dropboxmail.com=0100015ad33389ac-97f525d8-1d6f-44ce-a3b9-cc1ca75732aa-000000@comm-tech.org>
Received: from localhost ([::1]:35773) by zeus.comm-tech.org (kopano-dagent)
with LMTP for <support@comm-tech.org>; Wed, 15 Mar 2017 18:21:25 +0000
Received: from localhost (localhost [127.0.0.1]) by zeus.comm-tech.org
(Postfix) with ESMTP id 4429D8054742 for <support@comm-tech.org>; Wed, 15
Mar 2017 18:21:25 +0000
Received: from zeus.comm-tech.org ([127.0.0.1]) by localhost
(zeus.comm-tech.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id
XR12h3m5CIQr for <support@comm-tech.org>; Wed, 15 Mar 2017 18:21:24 +0000
Received: from localhost (localhost [127.0.0.1]) by zeus.comm-tech.org
(Postfix) with ESMTP id 0631E805474A for <support@comm-tech.org>; Wed, 15
Mar 2017 18:21:24 +0000
Received: from musashi.comm-tech.org (musashi.comm-tech.org [37.220.18.139])
by zeus.comm-tech.org (Postfix) with ESMTPS id CBC878054742 for
<support@comm-tech.org>; Wed, 15 Mar 2017 18:21:23 +0000
Received: from localhost (localhost.localdomain [127.0.0.1]) by
musashi.comm-tech.org (Postfix) with ESMTP id 3vk0Kv4KjZz1y5D for
<support@comm-tech.org>; Wed, 15 Mar 2017 18:21:23 +0000
Received: from musashi.comm-tech.org ([127.0.0.1]) by localhost
(musashi.comm-tech.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id
g4dlx3Z3PXyX for <support@comm-tech.org>; Wed, 15 Mar 2017 18:21:05 +0000
Received: from a10-71.smtp-out.amazonses.com (a10-71.smtp-out.amazonses.com
[54.240.10.71]) (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 <support@comm-tech.org>; Wed,
15 Mar 2017 18:21:05 +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?= <no-reply@dropboxmail.com>
To: =?utf-8?Q?Comm-Tech_Support?= <support@comm-tech.org>
Date: Wed, 15 Mar 2017 18:20:54 +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=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-1,
RCVD_IN_MSPIKE_WL=-0.01, SO_PUB_SNDR_DOMAIN_DKIM_60=-1.001, SPF_PASS=-0.001,
WITH_TLS_PFS=-0.4, _EXTERNAL_CONTENT=0.5, _EXTERNAL_IMG=0.4] autolearn=ham
autolearn_force=no
X-Ses-Outgoing: 2017.03.15-54.240.10.71
X-Dropbox-Message-Id: 12188999829150348713
Message-Id:
&lt;0100015ad33389ac-97f525d8-1d6f-44ce-a3b9-cc1ca75732aa-000000@email.amazonses.com&gt;

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</support@comm-tech.org></no-reply@dropboxmail.com></support@comm-tech.org></support@comm-tech.org></support@comm-tech.org></support@comm-tech.org></support@comm-tech.org></support@comm-tech.org></support@comm-tech.org></support@comm-tech.org></srs0=2dsq=2y=email.dropboxmail.com=0100015ad33389ac-97f525d8-1d6f-44ce-a3b9-cc1ca75732aa-000000@comm-tech.org>

Comments

  • object returned by imap_headerinfo():

    array(
    'date' => 'Wed, 15 Mar 2017 18:20:54 +0000',
    'Date' => 'Wed, 15 Mar 2017 18:20:54 +0000',
    'Recent' => ' ',
    'Unseen' => ' ',
    'Flagged' => 'F',
    'Answered' => ' ',
    'Deleted' => ' ',
    'Draft' => ' ',
    'Msgno' => ' 1',
    'MailDate' => '15-Mar-2017 18:20:54 +0000',
    'Size' => '10954',
    'udate' => 1489602054,
    )



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




    array(
    'date' => 'Wed, 15 Mar 2017 18:20:54 +0000',
    'Date' => 'Wed, 15 Mar 2017 18:20:54 +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' => '<0100015ad33389ac-97f525d8-1d6f-44ce-a3b9-cc1ca75732aa-000000@email.amazonses.com>',
    'toaddress' => '=?utf-8?Q?Comm-Tech_Support?= <support@comm-tech.org>',
    'to' =>
    array (
    0 =>
    stdClass::__set_state(array(
    'personal' => '=?utf-8?Q?Comm-Tech_Support?=',
    'mailbox' => 'support',
    'host' => 'comm-tech.org',
    )),
    ),
    'fromaddress' => '=?utf-8?Q?Dropbox?= <no-reply@dropboxmail.com>',
    'from' =>
    array (
    0 =>
    stdClass::__set_state(array(
    'personal' => '=?utf-8?Q?Dropbox?=',
    'mailbox' => 'no-reply',
    'host' => 'dropboxmail.com',
    )),
    ),
    'reply_toaddress' => '=?utf-8?Q?Dropbox?= <no-reply@dropboxmail.com>',
    'reply_to' =>
    array (
    0 =>
    stdClass::__set_state(array(
    'personal' => '=?utf-8?Q?Dropbox?=',
    'mailbox' => 'no-reply',
    'host' => 'dropboxmail.com',
    )),
    ),
    'senderaddress' => '=?utf-8?Q?Dropbox?= <no-reply@dropboxmail.com>',
    'sender' =>
    array (
    0 =>
    stdClass::__set_state(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/850
    https://github.com/osTicket/osTicket/pull/2126
  • It looks to me like you linked the solution......

    This pull request:
  • Yep, looks quite stale but hopefully it'll get merged in. Thanks.
Sign In or Register to comment.