::
lurgy.nl

documentation, notes, images and assorted //things//

[status: public]
.::last update::. 2026-07-14
https://lurgy.nl/
lol
lurgy.nl / projects / autocalsniffer.md
Files
listing for /projects
.. parent directory -
autocalsniffer.md add autocalsniffer project 22 days ago
graph-memory.md content file 5 days ago
INDEX.md add mauraders map project 22 days ago
m8-memory.md content file 5 days ago
m8-memory.md~ content file 5 days ago
marauders-map.md add mauraders map project 22 days ago
Auto Calendar Invite Scanner

Auto Calendar Invite Scanner

I use Thunderbird for email. It is mostly fine. But one thing it refuses to do properly is calendar invites.

In Gmail or Outlook, when someone sends you a meeting invite, it just shows up in your calendar. Even if you do not reply. Even if you delete the email. The appointment is there, greyed out or marked tentative, and you can see that yes, something is happening at 3pm on Thursday.

Thunderbird does not do this. It shows you the email, it shows you the little accept/reject buttons, and if you ignore them the invite disappears into the void. Which is annoying, because often I want to know that a meeting exists without committing to it. Or I want to see all the things I was invited to but declined, so I know what is going on around me.

So I wrote a tiny Thunderbird add-on to fix it.

What it does

Every time a new email arrives, or whenever I open an existing one, the add-on scans the message for text/calendar parts. If it finds an iCalendar invite, it parses it and copies the event into a calendar called Pending.

The trick is that it rewrites the event's UID before inserting it. Thunderbird normally tracks which invites you have already processed, so if it sees the same UID again it assumes you have handled it. By prefixing the UID with something like --x-auto-scraped-, the add-on keeps the original Thunderbird accept/reject flow working, while also giving you a separate read-only-ish view of every invite that crosses your inbox.

Why a separate calendar

I did not want the add-on to auto-accept things into my main calendar. That would be rude to the people who sent the invites, and it would spam my actual schedule with events I am not going to.

Instead, Pending acts like a map of all the activity around me. I can look at it and see: oh, there is a sprint review I am not invited to, or a deployment window I should know about, or a meeting that got moved. It is surveillance, but only of my own inbox.

How it works

The add-on is stupidly small. It is a background script that listens for two things:

  • messages.onNewMailReceived — when new mail arrives.
  • messageDisplay.onMessageDisplayed — when I open a message manually.

For each message, it walks the MIME parts recursively looking for text/calendar. When it finds one, it hands the body to ical.js, extracts the VEVENT, mangles the UID, and calls Thunderbird's calendar API to create or update the event in the Pending calendar.

That is basically it. No UI, no settings, no popup. You install it, create a calendar named Pending, and forget about it.

The downsides

Because the event exists in both the original invite and the scraped copy, Thunderbird sometimes sends you two notifications for the same meeting. This is mildly annoying but I have decided it is worth it for the visibility.

Also, the calendar has to be named Pending exactly, with a capital P. I could have added a setting for this, but I did not. Maybe one day.

Sometimes, Outlook users will take an existing calendar invite, modify it and send it out again as if it was new, and Outlook does not change the UUID. This addon cannot deal with that, and even Thunderbird will 'update' the old event in your calendar. This is usually not noticable, however if that person does it multiple times for multiple future meetings, it will 'update' every previous meeting as you accept them. This happens even without the addon.

Should you use it

If you are on Thunderbird and you miss the "everything shows up in my calendar" behaviour from corporate email, yes. It is not on addons.thunderbird.net because that involves signing and packaging and I cannot be bothered, but the .xpi is buildable from the source if you really want it. You should also be warned that I wrote it only for myself.

It works for invites from Outlook and from Thunderbird itself, which covers most of the nonsense I receive.