For newer versions of Thunderbird, emails can be imported and exported from the Thunderbird application itself, and if the account is configured with IMAP, it will be synchronized with the server.
Export mail to a Thunderbird .eml file
To export emails, you must select all the emails you want to export.
You can select the emails one by one or select them all at once. To do this, simply press Ctrl+A and all the emails in the folder will be selected.

Next, you must click the " Menu " button located at the top right and click Save as:

Once inside Save as , you must click File... or press Ctrl + S:

You must select the folder where you want Thunderbird to perform the export so that the emails are saved there.
When accessing the folder in question, we can see the files correctly:

Export Thunderbird configuration/messages to a compressed file
This export allows you to generate a compressed ZIP file with all the emails from an email account. To generate the compressed file, you must click the " Menu " button located at the top right and click Tools:

Next, all the tools available in the Thunderbird application will appear. You must click the Export.. option to start the process.

Click Export to start the export process.

Next, a window will open so you can browse the files on your device, and you must select the directory and the name you want this compressed file to have. Once done, click Save

The file export will begin, and the blue progress bar will show it. Once it finishes, a window will appear and give you the option to Finish

Thunderbird import
To import mail into an account configured in the Thunderbird application, you need to have a compressed file containing all the emails. To perform the import, you must click the " Menu " button located at the top right and click Tools:

Next, all the tools available in the Thunderbird application will appear. You must click the Import

You will access Thunderbird's own import tool. Here you must select the option depending on where you want to import the emails from. In this example, we will use the last option, since it allows you to import data from a compressed ZIP file:

You must select the option according to the data you want to import. In this case, we select the first option, which allows you to import from .zip files.

A window will automatically open so you can browse the files on your device; you only have to select the compressed file you want to import.

Next, Thunderbird will require you to select which data you want to import; you can deselect the items you do not want to import:

You only need to click Start import for the process to begin:

The import of the files will begin, and the blue progress bar will show it. Once it finishes, a window will appear and give you the option to Finish

For any questions, you can contact us.