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

[resolved] URGENT: Bug - Truncated mails in v1.10

osTicket-Version     v1.10 (901e5ea) — Up to date
Server-Software     Apache/2.4.10 (Debian)
MySQL-Version     5.5.49
PHP-Version     5.6.20-0+deb8

After some complaints from customers, we noticed that osticket sometimes truncate mails.

E.g. an incoming mail with the text

Hi Mats
is in osticket truncated to
Hi Mats
This seems to be a very bad bug, since it only occurs in some of the incoming mails.

Here is the full email including header for testing (ip/mail/server name changed):
Received: from localhost (ourmailserver [])
by ourmailserver (Postfix) with ESMTP id 5E211281F202;
Sat, 31 Dec 2016 07:39:58 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at
Received: from ourmailserver ([])
by localhost (ourmailserver []) (amavisd-new, port 10024)
with ESMTP id b4_pai8SrIfZ; Sat, 31 Dec 2016 07:39:57 +0100 (CET)
Received: from (unknown [])
(using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ourmailserver (Postfix) with ESMTPS id 5426D281F201
for ; Sat, 31 Dec 2016 07:39:57 +0100 (CET)
Received: from [] by xxx (via HTTP);
Sat, 31 Dec 2016 07:39:57 +0100
MIME-Version: 1.0
From: "name"
Subject: Bestellung
Content-Type: text/html; charset=UTF-8
Date: Sat, 31 Dec 2016 07:39:57 +0100
X-Provags-ID: V03:K0:qQDi030ak0umJ01NFhumMK/qsi3/M/vE314je8FkgLy
X-UI-Out-Filterresults: notjunk:1;V01:K0:3Oy14AThXNs=:3qAJ7Z51jWc7oESnj1J+EK

Hi Mats



Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.
Here as image if this forum strips the html tags:


  • Maybe you have used an unusual separator tag:

    The only other reason I know why tickets get truncated is a four byte character (for example an emoji):

  • Thanks for help.

    > Maybe you have used an unusual separator tag:

    There is no separator tag defined (field is empty).

    Does anyone can point me, how I can test incoming mails without sending test mails (e.g. in a php file set $incoming_mail = [here email header + body]? This would make troubleshooting easier.
  • "Field is empty" sounds to me that space could be in use as a separator tag.

    Maybe you should define a tag to see if the problem disappears..
  • As a side note: I pinged the Devs about this yesterday but failed to update the thread.
    They are trying to replicate this report currently and I expect to hear back from them regarding it.
  • Thanks ntozier.

    I have found two other incoming mails causing this trouble. Those mails are all from accounts ( is a German freemail provider). They all have a X-Provags-ID and a X-UI-Out-Filterresults tag in the mail header, maybe this is causing the trouble?

    If I can provide any other information to help to get this fixed ASAP, please let me know.

  • How could you set/save an empty separator tag?
    In my installations (1.9.x/1.10) the gui from osticket prevents that and an error is displayed (Reply separator is required to strip quoted reply).

    The only way I can do this is to change it in the database without the gui.

    Btw: I don't know how to test this without sending test mails..

  • Can you send me the original email in a DM? I piped the email text on this page to osTicket and it created a ticket just fine, so I need the original to test it definitively. Thank you.
  • edited January 2017
    @mfelber you pipe it to osTicket! Put the email file (.text or whatever) into the main osTicket directory and in command line you $ php api/pipe.php < example.text and it should create a ticket in the helpdesk! Pretty cool stuff!
  • Never mind, I found the issue and I'm making a Pull Request now. The issue was with our sanitation method. When we sanitize incoming emails we don't catch tags like '<head/>' leaving us with a bad format and a truncated email. Thank you for the find (very unique)!
  • edited January 2017
    wait... since when is '<head/>' a legitimate HTML(5) tag?

    Tags that do not have closing tags like meta or br sure... but head has a closing tag.  I do not think that head/ is a legitimate HTML code.  So there wouldn't really be a reason to look for it.
  • If you're interested is the pull request. You can pull it and test it if you'd like!
  • Your fix works like a charm. A BIG THANK YOU for all helping to find a fix so fast!
  • Not a problem! Thank you for reporting the find!
This discussion has been closed.