Thunderbird extension that makes it easier to unsubscribe from mailing lists.
24
stars
165
commits
JavaScript
primary language
Aug 13, 2026
updated
BetterUnsubscribe improves your email experience by streamlining the unsubscribe process. This extension adds a button to your navigation bar, which appears whenever an unsubscribe option is detected within an email.

BetterUnsubscribe offers several unsubscription methods based on what is available in the email:
List-Unsubscribe=One-Click header is detected, a POST request is sent to unsubscribe you.List-Unsubscribe email address (mailto://) is found in the header, a draft email is prepared for you to send.List-Unsubscribe web link (https://) is provided in the header, the site is opened in your browser.https://) is embedded in the email content, the site is opened in your browser.The extension's background scripts are split by responsibility:
common.js - shared helpers: a namespaced console logger and message-resolution logic for finding "the message the user currently has open".unsubExtraction.js - detects unsubscribe links and the message's recipient identity, by parsing the List-Unsubscribe header or scanning the message body for an embedded link.unsubMethods.js - defines the UnsubMethod strategies (UnsubPost, UnsubMail, UnsubWeb) that carry out each of the four unsubscribe methods listed above.background.js - ties it together: watches for a displayed/selected message, uses unsubExtraction.js and unsubMethods.js to detect and cache an unsubscribe method per message, drives the message-display action's enabled state, and handles the popup's runtime messages (unsubscribe, cancel, delete).popup.js and options.js are independent UI scripts for the toolbar popup and the settings page, respectively; both also depend on common.js.
When installing BetterUnsubscribe, Thunderbird will ask you to grant the following permissions. Here is why each one is needed:
| Permission | Reason |
|---|---|
accountsRead | Lists accounts, folders, and identities to match the correct sending identity when unsubscribing via email, and to search messages across all inboxes when deleting by domain. |
messagesRead | Reads message headers and body content to detect and extract unsubscribe links and methods. |
messagesDelete | Deletes messages when the user chooses to delete one or all messages from a sender or domain. |
compose | Opens a compose window when unsubscribing via a mailto: link. |
compose.send | Sends the unsubscribe email automatically when unsubscribing via a mailto: link. |
BetterUnsubscribe also requires access to external URLs in order to send one-click unsubscribe requests. Thunderbird will display these as "Access your data for all websites".
| Permission | Reason |
|---|---|
https://*/* | Makes POST requests to arbitrary unsubscribe URLs for one-click unsubscribe (RFC 8058). |
http://*/* | As above, for the rare case where an unsubscribe URL uses plain HTTP rather than HTTPS. |
You can download the latest version of BetterUnsubscribe here.
BetterUnsubscribe.xpi file in the build directory.
node compile.js (requires node.js)compile.sh (requires /bin/sh and 7z or zip installed).compile.ps1 (requires PowerShell and .NET).compile-z.ps1 (requires PowerShell and 7z or zip installed).BetterUnsubscribe.xpi file to install it.To ensure a consistent development workflow, use the following tools and commands. See CONTRIBUTING.md for contribution guidelines, including translations.
To format the codebase, run:
npm run format
To lint the codebase for potential issues, run:
npm run lint
To compile the project, run:
npm run compile
Please exercise caution when clicking web links provided in emails. Phishing attacks are common, and malicious links can compromise your security and privacy. Always verify the legitimacy of the sender before interacting with any email links.
A summary of potential security and privacy risks associated with unsubscribe tools can be found here.
Automated tests are provided to ensure BetterUnsubscribe works as expected. To run the tests, follow these steps:
Install dependencies: In the project directory, run:
npm install
This will install the necessary packages defined in package.json.
Run the tests: Once the dependencies are installed, run the following command to execute the test suite:
npm run test
This will test the functionality of BetterUnsubscribe and give feedback on any issues.
Remember to run the tests after making changes to ensure everything functions as intended.
A Brazilian Portuguese translation was contributed by dataserver.
The icon was created by freepik and is available on FlatIcon.
If you find this project useful, consider donating to support development:
164 commits
1 commits
JavaScript
88.0%
CSS
4.0%
HTML
3.3%
PowerShell
3.3%
Shell
1.4%
Thunderbird extension that makes it easier to unsubscribe from mailing lists.
24
stars
165
commits
JavaScript
primary language
Aug 13, 2026
updated
BetterUnsubscribe improves your email experience by streamlining the unsubscribe process. This extension adds a button to your navigation bar, which appears whenever an unsubscribe option is detected within an email.

BetterUnsubscribe offers several unsubscription methods based on what is available in the email:
List-Unsubscribe=One-Click header is detected, a POST request is sent to unsubscribe you.List-Unsubscribe email address (mailto://) is found in the header, a draft email is prepared for you to send.List-Unsubscribe web link (https://) is provided in the header, the site is opened in your browser.https://) is embedded in the email content, the site is opened in your browser.The extension's background scripts are split by responsibility:
common.js - shared helpers: a namespaced console logger and message-resolution logic for finding "the message the user currently has open".unsubExtraction.js - detects unsubscribe links and the message's recipient identity, by parsing the List-Unsubscribe header or scanning the message body for an embedded link.unsubMethods.js - defines the UnsubMethod strategies (UnsubPost, UnsubMail, UnsubWeb) that carry out each of the four unsubscribe methods listed above.background.js - ties it together: watches for a displayed/selected message, uses unsubExtraction.js and unsubMethods.js to detect and cache an unsubscribe method per message, drives the message-display action's enabled state, and handles the popup's runtime messages (unsubscribe, cancel, delete).popup.js and options.js are independent UI scripts for the toolbar popup and the settings page, respectively; both also depend on common.js.
When installing BetterUnsubscribe, Thunderbird will ask you to grant the following permissions. Here is why each one is needed:
| Permission | Reason |
|---|---|
accountsRead | Lists accounts, folders, and identities to match the correct sending identity when unsubscribing via email, and to search messages across all inboxes when deleting by domain. |
messagesRead | Reads message headers and body content to detect and extract unsubscribe links and methods. |
messagesDelete | Deletes messages when the user chooses to delete one or all messages from a sender or domain. |
compose | Opens a compose window when unsubscribing via a mailto: link. |
compose.send | Sends the unsubscribe email automatically when unsubscribing via a mailto: link. |
BetterUnsubscribe also requires access to external URLs in order to send one-click unsubscribe requests. Thunderbird will display these as "Access your data for all websites".
| Permission | Reason |
|---|---|
https://*/* | Makes POST requests to arbitrary unsubscribe URLs for one-click unsubscribe (RFC 8058). |
http://*/* | As above, for the rare case where an unsubscribe URL uses plain HTTP rather than HTTPS. |
You can download the latest version of BetterUnsubscribe here.
BetterUnsubscribe.xpi file in the build directory.
node compile.js (requires node.js)compile.sh (requires /bin/sh and 7z or zip installed).compile.ps1 (requires PowerShell and .NET).compile-z.ps1 (requires PowerShell and 7z or zip installed).BetterUnsubscribe.xpi file to install it.To ensure a consistent development workflow, use the following tools and commands. See CONTRIBUTING.md for contribution guidelines, including translations.
To format the codebase, run:
npm run format
To lint the codebase for potential issues, run:
npm run lint
To compile the project, run:
npm run compile
Please exercise caution when clicking web links provided in emails. Phishing attacks are common, and malicious links can compromise your security and privacy. Always verify the legitimacy of the sender before interacting with any email links.
A summary of potential security and privacy risks associated with unsubscribe tools can be found here.
Automated tests are provided to ensure BetterUnsubscribe works as expected. To run the tests, follow these steps:
Install dependencies: In the project directory, run:
npm install
This will install the necessary packages defined in package.json.
Run the tests: Once the dependencies are installed, run the following command to execute the test suite:
npm run test
This will test the functionality of BetterUnsubscribe and give feedback on any issues.
Remember to run the tests after making changes to ensure everything functions as intended.
A Brazilian Portuguese translation was contributed by dataserver.
The icon was created by freepik and is available on FlatIcon.
If you find this project useful, consider donating to support development:
164 commits
1 commits
JavaScript
88.0%
CSS
4.0%
HTML
3.3%
PowerShell
3.3%
Shell
1.4%