Thunderbird is Open-source Mail client which is used world wide in Linux/Unix/windows machines. Today we would see HowTo backup/export Thunderbird mail filters and restore/import on others machine or account.


Thunderbird used a simple .dat file to save mail filters. We Just need to take backup of this .dat file located in mail account directory and restore it in another account directory where we like enable same mail filters.

For this post we are using Ubuntu 16.04.3 machine.

root@jarvis:~# uname  -r

root@jarvis:~# lsb_release -d
Description:	Ubuntu 16.04.3 LTS

root@jarvis:~# thunderbird --version
 Thunderbird 52.4.0

For this post, I have configured my Gmail Account in thunderbird. Now i have to arrange my filters as it was earlier in my previous laptop. For same i have my backup which can help in restoring filters for same account.

We can found msgFilterRules.dat in $HOME/.thunderbird/mz70pfan.default/ImapMail/ like mentioned belo

ssirohi@jarvis:~$ file  ~/.thunderbird/mz70pfan.default/ImapMail/ 

/home/ssirohi/.thunderbird/mz70pfan.default/ImapMail/ ASCII text

We Just need to copy this file in same location to have same mail filters on thunderbird. After copying it, i can find my mail filter rules placed correctly they were in previous lappy