当前位置: 首页 > 工具软件 > Thunderbird > 使用案例 >

thunderbird主题_如何导出和导入Thunderbird消息过滤器

佴阳辉
2023-12-01

thunderbird主题

I have several installation of Thunderbird under Linux to check/send emails using IMAP email servers. I use filters extensively to manage my emails. How to export and import message filters of Thunderbird so that I can synchronize the rules on several installations?

我在Linux下安装了多个Thunderbird,以使用IMAP 电子邮件服务器检查/发送电子邮件。 我广泛使用过滤器来管理我的电子邮件。 如何导出和导入Thunderbird的消息过滤器,以便可以在多个安装中同步规则?

About message filters in Thunderbird (More at http://kb.mozillazine.org/Filters_(Thunderbird)):

关于Thunderbird中的邮件过滤器(更多信息,请参见http://kb.mozillazine.org/Filters_(Thunderbird) ):

Filters are account specific, there is no support for global filters.
The closest thing to a global filter would be to configure several POP
accounts to use a Global Inbox. In that case, you could create filters
for the Local Folders pseudo account that would be applied
automatically to incoming mail for those accounts.

过滤器是特定帐户的 ,不支持全局过滤器。
最接近全局过滤器的是配置多个POP
帐户以使用全局收件箱。 在这种情况下,您可以创建过滤器
用于将要应用的本地文件夹伪帐户
自动发送到这些帐户的传入邮件。

Where the filter settings are stored?

过滤器设置存储在哪里?

The file that stores your filter settings is called “msgFilterRules.dat”. Each account will have its own “msgFilterRules.dat” file, stored in the “Local Directory” for the account in your profile. The Local Directory is specified at the bottom of Tools -> Account Settings -> Server Settings, right by the Browse button. The filters for Local Folders are stored in the MailLocal Folders directory in the profile.

存储您的过滤器设置的文件称为“ msgFilterRules.dat”每个帐户将拥有自己的“ msgFilterRules.dat”文件,该文件存储在您的配置文件中该帐户的“本地目录”中 。 本地目录是在“工具”->“帐户设置”->“服务器设置”的底部,紧挨着“浏览”按钮指定的。 本地文件夹的筛选器存储在配置文件的MailLocal Folders目录中。

How to backup/duplicate the filters?

如何备份/复制过滤器?

If you want to duplicate an accounts filters in another account you don’t need to create them again. Exit Thunderbird and copy the “msgFilterRules.dat” file instead. If the account is in another profile and it uses custom headers you will also need to copy the mailnews.customHeaders setting from prefs.js.

如果要在另一个帐户中复制一个帐户过滤器,则无需再次创建它们。 退出Thunderbird并复制“ msgFilterRules.dat”文件。 如果该帐户在另一个配置文件中,并且使用了自定义标头,则还需要从prefs.js复制mailnews.customHeaders设置。

Remember to close Thunderbird before manually change these msgfilterRules.dat files. Otherwise, Thunderbird will overwrite your changes.

在手动更改这些msgfilterRules.dat 文件之前,请记住先关闭Thunderbird。 否则,Thunderbird将覆盖您的更改。

To quickly find all your filter setting files on Linux, run

要在Linux上快速找到所有过滤器设置文件,请运行

find ~/.thunderbird/ -name msgFilterRules.dat

The msgFilterrules.dat is just plain text file. Edit it as you needed—usually just the directory paths for duplicating an account’s filter to another account.

msgFilterrules.dat只是纯文本文件。 根据需要进行编辑-通常只是用于将一个帐户的过滤器复制到另一个帐户的目录路径。

Answered by Eric Z Ma.
埃里克·马(Eric Z Ma)回答。


Like you, I want to have one and only one mail filter set. This can be done, at least on Linux.

像您一样,我希望只设置一个邮件过滤器。 至少在Linux上可以做到这一点。

Go to the directory, /home/[username]/.thunderbird/[random].default/

转到目录/ home / [用户名] /。thunderbird / [random] .default /

sudo find / -iname “msgFilterRules.dat”

须藤查找/ -iname“ msgFilterRules.dat”

will show you all the filters as described by others. Pick whichever one you want to be the main one. I chose ./Mail/Local Folders/msgFilterRules.dat, which is the rule in the Local Folders directory that I don’t otherwise use. Copy the one you want every account to use into this directory.

将向您显示其他人描述的所有过滤器。 选择您想成为主要的任何一个。 我选择了./Mail/Local Folders / msgFilterRules.dat,这是Local Folders目录中不使用的规则。 将您希望每个帐户使用的帐户复制到此目录中。

Go to each mail directory and enter the command:

转到每个邮件目录并输入命令:

ln -bsv ../../Mail/Local Folders/msgFilterRules.dat msgFilterRules.dat

ln -bsv ../../Mail/Local Folders / msgFilterRules.dat msgFilterRules.dat

This will backup the previous filter file, and create a soft link to the file in ./Mail/Local Folders. [Obviously you’ll have to alter this if you want a different filter file to be your primary.]

这将备份以前的筛选器文件,并在./Mail/Local Folders中创建到该文件的软链接。 [显然,如果您希望其他过滤器文件成为主要文件,则必须更改此设置。]

In effect, every mail account will follow the softlink and load the same ruleset.

实际上,每个邮件帐户都将遵循该软链接并加载相同的规则集。

What I haven’t checked yet is what happens if you choose to edit your filters in Thunderbird. Presumably the link would be wiped out. But as long as you have a copy of the final version of your filters, you can restore them easily enough.

我还没有检查的是,如果您选择在Thunderbird中编辑过滤器,将会发生什么。 大概链接将被清除。 但是,只要您拥有过滤器最终版本的副本,就可以轻松地还原它们。

翻译自: https://www.systutorials.com/how-to-export-and-import-message-filters-of-thunderbird/

thunderbird主题

 类似资料: