This repository contains a Python script to assist in migrating email data from MDaemon to Postfix. The script processes directories of email files, removes empty files, and modifies IMAP files to prepare them for import into the Postfix mail system.
- Removes all empty files from the specified directory
- Removes all non-
.msg
files from the specified directory - Modifies IMAP files to ensure proper content formatting
- Imports emails into the Postfix mail system
To use the script, follow these steps:
-
Clone the repository:
git clone https://github.com/khodekia/postfix-migration.git cd postfix-migration
-
Run the script:
python migrate.mdeamon.py /path/to/directory
Note: The script will prompt for confirmation before removing files and modifying IMAP files.
The main script, migrate.mdeamon.py
, performs the following tasks:
- Checks the provided directory for empty files and removes them.
- Removes all files except
.msg
files in the specified directory. - Modifies IMAP files to ensure proper formatting.
- Uses
zmmailbox
to create folders and add messages to the Postfix mail system.
Contributions are welcome! Please fork this repository and submit a pull request for any enhancements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or support, please open an issue in this repository.