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

Email creates new ticket rather than appends to existing ticket with correct subject

Hello, we're having a problem with emails not being filtered and appended to existing tickets correctly. Most of the time the functionality works as expected - if "[#<ticket_number>]" is in the subject line, an email will be appended to the respective existing ticket as a reply. For certain out of office messages, this is not the case and instead a new ticket is created. The new ticket contains "[#<ticket_number>]" in it's subject, where ticket_number already exists in the system! We'd like these out of office messages to be appended to the existing ticket. The out of office message is being generated by a kopano mail server.

I'm not sure where to begin in debugging this. The headers of the email are base64 encoded, from the below it's possible the subject is not parsed correctly, or maybe it is some other header which stops the email being appended to an existing ticket. Could someone make a few suggestions of where to start, or point me to the line of code which processes the headers to decide whether to append to an existing ticket or create a new one? Is it in 'include/class.mailfetch.php'?


Email headers:
Return-Path: ...
From: =?UTF-8?B?TWFyayBBbnRob255?= <>
X-Kopano-Vacation: autorespond
X-Auto-Response-Suppress: All
Precedence: bulk
Subject: =?UTF-8?B?T3V0IG9mIG9mZmljZSBbIzkzNjczMV0=?=
Date: Thu, 12 Oct 2017 14:21:05 +0100
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: base64
Mime-Version: 1.0
Message-Id: <>

Version Info:
osTicket Version     v1.9.14 (8b927a0)
Web Server Software     Apache/2.4.7 (Ubuntu)
MySQL Version     5.5.52
PHP Version     5.5.9-1ubuntu4.22


  • The from does not match the sender or an agent working on the ticket.
    The subject doesn't appear to have [#123456789] in it... but it is encoded.
    The message-id may or may not be related to the original message.
    The accepting of this email, and adding it to the ticket thread would result in a message being sent... which would then result in an out of office message... or in other words would result in an endless email loop.
Sign In or Register to comment.