A Firefox extension that copies the RFC 2822 Message-ID of the currently viewed Gmail message to the clipboard.
Useful when you need to reference a specific email in bug trackers, mailing list archives, or notmuch/mu searches.
- Click the toolbar icon while viewing a Gmail message to copy its Message-ID
- Keyboard shortcut: Alt+M
- Works with multi-account Gmail (
/mail/u/0/,/mail/u/1/, etc.)
- Open
about:debugging#/runtime/this-firefoxin Firefox - Click Load Temporary Add-on...
- Select any file in this directory (e.g.
manifest.json)
The extension will remain active until you restart Firefox.
To install permanently without going through AMO, you need Firefox Developer Edition or Nightly, with xpinstall.signatures.required set to false in about:config.
- Zip the extension files:
zip -r gmail-message-id-copier.xpi manifest.json content.js popup.html popup.js background.js icon.svg
- Open
about:addonsin Firefox - Click the gear icon and select Install Add-on From File...
- Select the
.xpifile
Submit the extension at addons.mozilla.org for signing. You can choose "self-distribution" (unlisted) to get a signed .xpi without publishing it publicly.
- Open a message in Gmail
- Click the Copy Message-ID toolbar icon, or press Alt+M
- The Message-ID is now in your clipboard (e.g.
[email protected])
The extension injects a content script into Gmail that:
- Extracts Gmail's internal session key (
ik) and the current message identifier from the DOM - Fetches the raw RFC 2822 message source via Gmail's
?view=omendpoint - Parses the
Message-IDheader from the raw email headers
| File | Purpose |
|---|---|
manifest.json |
Extension manifest (Manifest V3) |
content.js |
Content script injected into Gmail — extracts and parses Message-ID |
popup.html/js |
Browser action popup — triggers extraction and shows result |
background.js |
Handles the Alt+M keyboard shortcut |
icon.svg |
Toolbar icon |