A simple and effective Webmin/Virtualmin module to migrate email accounts between IMAP servers using the power of imapsync. It provides a clean user interface within Webmin and a real-time log viewer to monitor the migration process.
- 🖥️ User-Friendly Interface: Clean and intuitive form to configure source and destination server details
- 📊 Real-Time Monitoring: Live log viewer that refreshes automatically, showing
imapsyncoutput as it progresses - 🔒 Secure Password Handling: Passwords are stored in temporary files with secure permissions and automatically deleted after migration
- 🎛️ Advanced Options: Support for SSL/TLS connections, folder filtering, size/age restrictions, and email reports
- 🐛 Debug Mode: Built-in debugging tools for troubleshooting migration issues
- 🌐 Multi-language Support: Available in English and Portuguese
- ⚡ Self-Contained: Robust and independent of specific Webmin theme configurations
Before installing this module, you must have imapsync installed on your server.
For Debian/Ubuntu:
sudo apt-get update && sudo apt-get install imapsyncFor Red Hat/CentOS:
sudo yum install epel-release && sudo yum install imapsyncFor other distributions: Check your package manager or install from source.
- Go to the Releases page of this repository
- Download the latest
imap-migrator.wbm.gzfile - In Webmin, navigate to Webmin → Webmin Configuration → Webmin Modules
- Select From local file or From uploaded file
- Choose the
imap-migrator.wbm.gzfile you downloaded - Click Install Module
The module will be available under the Tools category in the left-hand menu.
- Download the module files
- Extract to
/usr/share/webmin/imap-migrator/ - Set proper permissions:
chmod 755 /usr/share/webmin/imap-migrator/ - Restart Webmin
- Navigate to Tools → IMAP Migrator in Webmin
- Fill in the source server details:
- IMAP Server: Your source server address
- User: Email account username
- Password: Email account password
- Security: Choose SSL/TLS if required
- Fill in the destination server details (same fields)
- Click Start Migration
- Monitor the real-time log for progress
The module includes several advanced features accessible through tabs:
- Credentials: Basic server configuration
- Advanced: Size limits, age filters, folder inclusion/exclusion, email reports
- Debug: Debugging options and real-time testing tools
If you want to modify the module or build the package from source:
-
Clone this repository:
git clone https://github.com/wmolinjr/imap-migrator.git cd imap-migrator -
Run the build script:
./build.sh./build.bat- The
imap-migrator.wbm.gzpackage will be created in the root directory
# Clone the repository
git clone https://github.com/wmolinjr/imap-migrator.git
cd imap-migrator
# Make build script executable
chmod +x build.sh
# Build the module
./build.shimap-migrator/
├── assets/ # CSS and JavaScript files
│ ├── terminal.min.css # Terminal styling
│ ├── terminal.min.js # Terminal functionality
├── help/ # Help documentation
│ ├── help.html # English help
│ └── help.pt.html # Portuguese help
├── lang/ # Translation files
│ ├── en # English translations
│ └── pt # Portuguese translations
├── index.cgi # Main interface
├── migrate.cgi # Migration execution
├── log_viewer.cgi # Real-time log viewer
├── imap-migrator-lib.pl # Backend library
├── install_check.pl # Installation check script
├── module.info # Module information (English)
└── module.info.pt # Module information (Portuguese)
Module not appearing in Webmin:
- Ensure proper file permissions
- Check Webmin error logs
- Verify module installation path
imapsync not found:
- Install imapsync package for your distribution
- Verify imapsync is in PATH:
which imapsync
Migration fails:
- Check server connectivity
- Verify credentials
- Review real-time logs for specific errors
- Enable debug mode for detailed information
Enable debug mode in the Debug tab to access:
- Real-time testing tools
- Detailed console logging
- Server connectivity tests
- Log file verification
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If this project helped you, consider supporting:
- 💸 GitHub Sponsors
- ☕ Buy Me a Coffee
- 📢 Share with friends and colleagues!
All help is welcome to keep the project alive 🚀
- imapsync - The powerful tool that makes this all possible
- Webmin - The excellent web-based system administration tool
- All contributors and users who help improve this module
Made with ❤️ for the Webmin community