是否可以通过自定义扩展更新 Thunderbird 中的过滤规则?

Is it possible to update filter rules in Thunderbird via custom extension?

您好,感谢您的关注。

我想为实现某种黑名单的 Mozilla Thunderbird 创建一个扩展。 可以为邮件创建过滤规则,我想添加一个为所选邮件创建过滤规则的按钮。这些规则存储在 msgFilterRules.dat 文件中,我可以手动编辑它,但只能在 Thunderbird 关闭时进行。

有什么方法可以用某种 API 或 WebExtensions 来操作这个文件吗?

感谢来自 https://thunderbird.topicbox.com/groups/addons

的 John Bieling

currently we have no API to manipulate filters, but it has been requested and we will add that eventually. In the meantime, you could implement your own filter system, by listening for new messages and move them if they hit your own blocklist: https://webextension-api.thunderbird.net/en/91/messages.html#onnewmailreceived https://webextension-api.thunderbird.net/en/91/messages.html#move-messageids-destination