osTicket Was Silently Dropping Reply Alerts — Here’s What Actually Broke

We recently ran into a frustrating and surprisingly difficult-to-diagnose osTicket issue involving:

  • Microsoft 365 OAuth IMAP inbound mail
  • AWS SES outbound SMTP
  • threaded customer replies
  • missing staff notifications

The weird part?

Everything appeared to work correctly.

Customer replies were successfully appended to existing tickets, but osTicket never generated “New Message Alert” notifications for staff or agents.

This post documents:

  • the symptoms
  • the debugging process
  • the actual root cause
  • and the source-code patch that fixed it.

Environment

Our stack looked like this:

ComponentConfiguration
osTicketv1.18.3
OSUbuntu 20/22
Web ServerApache
PHP8.2
Inbound MailMicrosoft 365 IMAP (OAuth2)
Outbound MailAWS SES SMTP

Important detail:

  • inbound and outbound email paths were split
  • the issue appeared after moving outbound mail to AWS SES

The Exact Symptom

This distinction is critical.

What worked

✅ IMAP mail fetching worked
✅ New tickets created correctly
✅ Customer replies appended to existing tickets
✅ AWS SES outbound SMTP worked
✅ New ticket alerts worked normally

What failed

❌ Staff “New Message Alert” emails were never sent for threaded customer replies

This created a particularly confusing scenario because:

  • replies appeared correctly inside the ticket
  • agents could see them if logged into osTicket
  • but nobody received email notifications

Initial Troubleshooting

We checked basically everything:

  • Department manager alerts
  • Assigned agent alerts
  • Last respondent alerts
  • Queue visibility
  • Team assignments
  • Department configuration
  • Mail fetching
  • SMTP delivery
  • Cron execution
  • osTicket templates
  • Database values
  • Apache logs
  • PHP syntax/runtime errors

Nothing obvious appeared broken.

Even worse:
there were no meaningful errors in either Apache logs or osTicket logs.


The Important Discovery

Eventually, we started adding debug logging directly into the osTicket source.

The breakthrough came while tracing logic through:

<code>include/class.thread.php
</code>

Specifically this section:

<code>'autorespond' =&gt; !isset($mailinfo&#91;'passive']),
</code>

We later discovered replies were being marked as:

<code>$mailinfo&#91;'passive'] = true;
</code>

due to:

<code>// Passive threading - listen mode
</code>

What “Passive Threading” Means

osTicket normally embeds identifiers into outbound emails.

When a customer replies:

  • osTicket decodes those identifiers
  • recognizes the ticket
  • processes the message normally

However, after moving outbound mail through AWS SES while still ingesting replies through Microsoft 365 IMAP, osTicket could no longer fully decode its own outbound identifiers consistently.

So osTicket fell back to:

<code>Passive threading
</code>

Passive threading still allowed replies to attach to the correct ticket using heuristics like:

  • subject matching
  • References headers
  • In-Reply-To headers

Which is why threading itself still worked.


The Real Bug

At first glance, passive threading looked like the problem.

But it actually wasn’t.

The real issue was that osTicket later reused:

<code>$autorespond = false;
</code>

to suppress BOTH:

  • customer autoresponses
  • staff alert notifications

Specifically this logic in:

<code>include/class.ticket.php
</code>
<code>if (!($alerts &amp;&amp; $autorespond))
    return $message;
</code>

Because passive threading forced:

<code>$autorespond = false;
</code>

staff notifications were silently skipped entirely.

So the chain became:

<code>Passive threading
→ autorespond = false
→ staff alerts skipped
</code>

Even though the incoming customer reply was legitimate.


The Fix

The solution was to separate:

  • autoresponder suppression
    from
  • staff notification suppression

We added a dedicated variable:

<code>$staffalerts = $alerts
    &amp;&amp; !(isset($vars&#91;'mailflags'])
        &amp;&amp; (!empty($vars&#91;'mailflags']&#91;'bounce'])
            || !empty($vars&#91;'mailflags']&#91;'auto-reply'])))
    &amp;&amp; !$message-&gt;isBounceOrAutoReply();
</code>

Then changed:

<code>if (!($alerts &amp;&amp; $autorespond))
    return $message;
</code>

to:

<code>if (!$staffalerts)
    return $message;
</code>

Why This Works

This preserves suppression for:

  • bounce messages
  • automatic replies
  • vacation responders
  • mail loops

while still allowing legitimate customer replies to generate:

  • staff notifications
  • agent alerts
  • “New Message Alert” emails

even when passive threading occurs.


Temporary Debug Logging

During troubleshooting, we added temporary logging like:

<code>error_log(date('c') . " OST DEBUG vars: "
    . json_encode($vars));
</code>

and monitored:

<code>tail -f /tmp/osticket-debug.log
</code>

This made it possible to trace:

  • mail flags
  • passive threading state
  • autorespond behavior
  • alert suppression logic

Once fixed, the debug logging was removed/commented out.


Important Caveat

This is a source-code modification to osTicket core files.

Future osTicket updates may overwrite the patch.

Before editing, make backups:

<code>cp include/class.ticket.php include/class.ticket.php.backup
</code>

and document the change somewhere internally.


Long-Term Considerations

Long-term, using Microsoft 365 for BOTH:

  • inbound
  • outbound

may avoid passive threading behavior entirely.

However, this patch fixes the actual logic flaw regardless of mail provider combination.

Even if passive threading occurs, legitimate customer replies should still generate staff alerts.


Final Thoughts

This was one of those issues where:

  • mail worked
  • threading worked
  • notifications partially worked
  • logs showed nothing useful

Yet an entire portion of the workflow silently failed.

If you’re running:

  • osTicket
  • Microsoft 365 OAuth IMAP
  • AWS SES SMTP

and seeing:

  • replies append correctly
  • but staff never receive “New Message Alert” emails

check whether passive threading is suppressing alerts through the shared $autorespond logic.

That ended up being the real culprit.

Building My First FPV Drone | Parts – Build – Tips

I’ve had a DJI drone for a few years now. It’s reliable and super easy to fly. Recently a friend asked me if I had any recommendations for an FPV drone – next thing you know, I was researching how exactly to build an FPV drone of my own. So here’s what I did!

Continue reading

Windows 3D Pinball on 7, 8, & 10

We all remember the good old times when the bundled games that came with an operating system were actually worth playing. Solitaire, Minesweeper, and my personal favorite, Pinball. Unfortunately a lot of these are missing from today’s operating systems. Most require an additional download or even cost a few dollars to get full access to. Luckily there’s one classic that you can still manage to find and install, 3D Pinball!

Windows 3D Pinball

Now you could go through the hassle of finding and using a Windows 98 install disk to grab a copy of the awesome game that is pinball. Or you could just download this installer. 3D Pinball for Windows

 

Can’t watch Netflix! Comcast disrupting connection?

There are many online content providers, from Google Play to Amazon Prime. However, the one with the best content selection for the price is still Netflix. Netflix is an amazing service, especially considering the price. Unfortunately I can only fully utilize this service if my internet connection can support it. Now ideally, I pay my Internet Service Provider for Internet access; unrestricted Internet access. And it isn’t anything Cheap. I can get Netflix for just $8 bucks a month, but I have to give up over $50 a month just for a measly 8Mbps connection. Doesn’t seem fair, but hey, that’s my only option. The great monopoly that is Comcast is the only cable Internet provider in my area… I pay then handsomely for Internet access, yet at times it would appear that they are failing to do even that. Recently I have been having a very hard time streaming content from Netflix, and I’m not alone.

Continue reading

Setting Up Automatic Remote Backups With rsync

Keeping up to date backups is very important when dealing with any type of online server. One can never predict when a hard drive will fail, a file system gets corrupt, or even when mother nature will ruin your day. Thus the reason to keep not only an on-site backup but a remote duplicate in a completely different location.

In this guide I will walk you though setting up a complete remote backup solution using rsync on just about any Linux distribution you would be using. Let’s get started!

Continue reading

Battlefield 4 PC Review

On October 29, 2013, DICE released their latest addition to the Battlefield series of first person shooter video games; Battlefield 4. I personally played the public beta in early October and I have to say, I wasn’t impressed. The game came heavy with bugs, hindering the ability to enjoy playing the game. I also didn’t feel that it was much different than BF3, at least not different enough to justify spending the current retail value of $59.99 on it. I do however hear that many of the problems have since been resolved for the official release. Below is a good review made by a friend of mine. So if you’re still hesitant, maybe he can help you make up your mind. I myself, after watching his video, am actually considering getting the game. Enjoy!

Setup A Minecraft Pocket Edition Dedicated Server

Minecraft is awesome, we all know that. For the most part the game has been played on the PC and recently been developed to work on the xBox. Even more recently Mojang has developed pocket editions of this great game. Android and iOS users can now download Minecraft – Pocket Edition that runs on their mobile devices. In recently updated, Mojang has even added support for multiplayer.  Unfortunately, they have yet to release an  official server. Officially, the only way to create a multiplayer server is through direct hosting through the app itself. However, there is currently an unofficial server being developed that can run on a desktop computer.

Continue reading

Feed The Beast: Ultimate – Automatic Peat Farm

I’ve come to the conclusion that I just haven’t been producing as much video game content as I would like to. I play video games every day but I never share any of it with my readers. Well, to day that changes. Today I’m going to show you my little peat farm that I have setup to power some engines that I use to produce MJ.

FTB Peat Bog

Overall it quite a simple setup. I have a Peat Bog that keeps an area automatically farms. Once a block of bog earth is ready to be harvested, it does so and deposits it into the barrel I have next to the Turbary.

FTB Bog Recipie

Continue reading

Greenify – Keep Background Android Apps Under Control

Android is a great operating system with so many powerful applications that expand its possibilities. The only downside to this large array of applications is that many of them are written in a way where they are always running in the background of your phone. As much as I like having the Facebook app on my phone, I don’t need to get notifications from it; that’s why I have email notifications setup. I don’t need to be notified twice from this app. This is why I use another app to manage things like Facebook and other apps that demand to be running in the background, consuming precious resources.

Continue reading

VolumeDrive Down | August 2013

UPDATES AT BOTTOM OF POST

I have been using a VPS from VolumeDrive for quite some time now. To be honest, I don’t know why I still have it. I have reviewed VolumeDrive before and the review was mostly positive but it seems that all the trouble I am having just isn’t worth the price. For months now my server has been off and on for hours at a time. Their network also can turn to crap at times. Unfortunately today is much worse. For about the last 24 hours, no one has been able to access ANY of the VolumeDrive infrastructure. I cannot access my VPS (on node 12) or even their website. The worst part is, they haven’t said a word to any of their customers regarding the issue.

Continue reading

Clear Home Internet – First Impression

I had finally had enough with my current AT&T connection, it was far too unreliable and plain old slow to even use. Plus, they didn’t offer anything better than their lowest tier in my area. A lousy 0.77kB/s just was not enough. Due to this, I though I would try getting twice the speed for just about the same price through Clear. For those that don’t already know, clear is a 4G Internet provider. They have solutions that provide online connectivity for both on the go as well as in home. I gave their in home 4G service a try.

The first thing I wanted to see was how well I would be covered by their network in my house. I went to their website and found out that there are two tower located just within a few blocks of my house. This meant that I was in an excellent location for their 4G coverage.

Continue reading

Facebook Implements Hashtags

Facebook recently announced their implementation of hashtags. They have begun to implement the use of hashtags in status updates for select users and soon plan to allow every user to have access to the feature. hashtags will allow users to tag their posts and search for similar posts that share the same hashtags.

Continue reading

Monitor And Control DD-WRT Internet Access From Any Android Device

DD-WRT is amazing. Android is amazing. Combine the two and you get an awesome app that allows you to remotely monitor and view the Internet access on your network, WRTGate from the Google Play market allows users to connect to their router and view live graphs of all the devices on their network that are currently accessing the Internet. It also provides the ability to toggle Internet access for each one of these devices with the tap of a button. It’s a very useful app.

Continue reading

Attach a RAW Hard Drive to an ESXi Guest

I’m always thinking about my servers and how I can either condense them, learn something new from them, or simply mess around with them. Well, recently I discovered just now easy it can be to connect a hard disk directly to an ESXi guest allowing the virtual machine to directly access the information on the drive.

I even tested the set up by pulling the drive out of the server and into a SATA dock on my main computer. I was able to directly browse the files that the ESXi guest had written to the drive.

Continue reading

Crashplan Review With Central Backup

Crashplan is a paid service that offers an easy means of creating an off site backup of your computer(s). For a monthly fee you can purchase different levels of storage. They have one small plan and then two more unlimited plans that allow you to either back to one computer or a few depending on the plan. The plan being reviewed here is the Unlimited backup plan for one computer.

Continue reading