Bugmail filtering

Table of contents

Keeping up with Bugmail can be a challenging task. After using Bugzilla for a while, you become CC'ed on quite a few bugs and maybe also subscribe to one or more components. With time, the amount of mail you receive can become overwhelming and you might wonder how to keep on top of it. In this post, I'm going over the setup that I've built in the 4 years I've been at Mozilla.

Setup

My setup has changed over time. In the beginning I used Thunderbird filters to filter on bugmail and added rules over time. This already allows to sort mail into the useful folders and tag important mails. However, you can't modify mails with Thunderbird filters.

The new setup I'm going to present here allows rewriting mails and do complex filtering with the mail filter language sieve. The setup has been in place for half a year.

I'm hosting a mail server on a Raspberry Pi to fetch new mails and run sieve scripts on them, before I retrieve them via imap from my Thunderbird client. The mails are fetched via fetchmail on the Raspberry Pi, and then delivered to dovecot with postfix. Dovecot runs my sieve scripts on all incoming mail.

setup overview

Bugzilla Mail Headers

Bugzilla adds meta-information to all bugmail it sends out. The headers look like this:

X-Bugzilla-Reason: Reporter AssignedTo
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Classification: Components
X-Bugzilla-ID: 1992712
X-Bugzilla-Bug-Type: enhancement
X-Bugzilla-Product: Core
X-Bugzilla-Component: Privacy: Anti-Tracking
X-Bugzilla-Version: unspecified
X-Bugzilla-Keywords: 
X-Bugzilla-Severity: N/A
X-Bugzilla-Who: csabou@mozilla.com
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: FIXED
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: manuel@mozilla.com
X-Bugzilla-Target-Milestone: 145 Branch
X-Bugzilla-Flags: 
X-Bugzilla-OS: Unspecified
X-Bugzilla-Changed-Fields: Last Resolved Resolution Status status-firefox145
 Target Milestone Comment Created
X-Bugzilla-Changed-Field-Names: cf_last_resolved resolution bug_status
 cf_status_firefox145 target_milestone comment

Enhancing Subject/From

In my sieve script I take these headers and make quite a few modifications:

  1. I take the X-Bugzilla-Who and set the From to this value making it show up as correspondent in Bugzilla.

  2. I take X-Bugzilla-Priority, X-Bugzilla-Severity, X-Bugzilla-Status, X-Bugzilla-Resolution and extend the brackets in the mail header that usually only contains the bug number with these fields when they are at non-default value. Upper casing the values if they have changed with this mail.

  3. The X-Bugzilla-Changed-Field-Names is used to add emojis after the [], to make it clear on a glance what the change is about.

    FieldEmoji
    short_desc🏷️
    comment💬
    attachment📎
    assigned_to👤/👥
    blocked🧱
    depends_on🔨
    see_also👀
    cc🅭
    bug_file_loc (url)🌐
    status_whiteboard🪧
    keywords🔑
    cf_user_story📇
    regresses📉
    regressed_by📈
    bug_group (security group)🙈
    dep_changed (not this bug changed, but depending)⛓️
  4. The X-Bugzilla-Bug-Type turns into an emoji at the beginning of the subject line

    Typemodifiedunchanged
    defect🐞🪲
    enhancement🧰🔧
    task📌📝

Here is a visualization of how the mail looks like after the info was added and where the info is coming from:

header

Involvement

Then I'm also using the bugmail headers to sort the mails by how involved I am within the bug. I'm sorting the bugs into these categories:

  1. Directly involved: Sort into Assignee / Reporter / needinfo / CC
  2. Team components: All components my team owns, some of which I help triage
  3. Interesting components: I loosely read bugmail there. Mostly components where I have past involvement (Necko) or larger team involvement, where it is helpful for me to sometimes chime in. I sometimes mark all mail of these components as read when I haven't taken a look for a longer time there.

involvement

Highlighting bugs

I also tag some more bugs to highlight them in Thunderbird:

Further Resources

This blog post is based on a lightning talk I gave on 2025-11-13. You can watch the recording or take a look at the slides. I gave a brief view into the source code.

Tags: #mozilla #firefox #bugmail