Standalone CLI tool to export Forward Email encrypted SQLite mailbox backups as EML files, VCF contacts, and ICS calendar resources in a password-protected ZIP archive.
- Interactive CLI: prompts for file path, password, and output location
- Non-interactive mode: pass arguments as command-line flags for scripting
- Cross-platform: works on Windows, Linux, and macOS
- Encrypted database support: handles both chacha20 and aes256cbc ciphers
- Brotli decompression: decompresses Brotli-compressed metadata and attachments
- Password-protected ZIP: the output archive is encrypted with AES-256
- Organized output: EML files are sorted by mailbox folder, VCF contacts by address book under
Contacts, and ICS events or tasks by calendar underCalendars - Pre-built binaries: download from GitHub Releases (no Node.js required)
Download the latest release for your platform from GitHub Releases:
| Platform | Architecture | File |
|---|---|---|
| Linux | x64 | convert-sqlite-to-eml-linux-x64 |
| Linux | arm64 | convert-sqlite-to-eml-linux-arm64 |
| macOS | Apple Silicon | convert-sqlite-to-eml-darwin-arm64 |
| Windows | x64 | convert-sqlite-to-eml-win-x64.exe |
macOS users: After downloading, you may need to remove the quarantine attribute before running the binary:
sudo xattr -rd com.apple.quarantine ./convert-sqlite-to-eml-darwin-arm64(Replace
./convert-sqlite-to-eml-darwin-arm64with the actual path to the downloaded file.)
Linux users: After downloading, you may need to make the binary executable:
chmod +x ./convert-sqlite-to-eml-linux-x64(Replace
./convert-sqlite-to-eml-linux-x64with the actual path to the downloaded file.)
npm install -g @forwardemail/convert-sqlite-to-emlcd tools/convert-sqlite-to-eml
npm install
node index.jsRun without arguments to be prompted for all inputs:
convert-sqlite-to-eml Forward Email - Convert SQLite Backup to EML
=============================================
Path to SQLite backup file: /path/to/backup.sqlite
IMAP/alias password: ********
Output ZIP path [/path/to/backup-2025-03-01T12-00-00-000Z.zip]:
convert-sqlite-to-eml \
--path /path/to/backup.sqlite \
--password "your-imap-password" \
--output /path/to/output.zip| Flag | Description |
|---|---|
--path <path> |
Path to the encrypted SQLite backup file |
--password <pass> |
IMAP/alias password for decryption |
--output <path> |
Output path for the ZIP file (default: auto-generated) |
--help |
Show help message |
The tool produces a password-protected ZIP archive (AES-256 encrypted) containing:
README.txt
INBOX/
<message-id-1>.eml
<message-id-2>.eml
Sent/
<message-id-3>.eml
Drafts/
<message-id-4>.eml
Contacts/
Personal/
alice.vcf
Calendars/
Work/
planning.ics
...
- Each
.emlfile is a standard RFC 5322 email message - EML files are organized by mailbox folder
- VCF contact files are organized by address book under
Contacts - ICS event and task resources are organized by calendar under
Calendars - The ZIP password is the same as your IMAP/alias password
- EML files can be opened with any email client (Thunderbird, Outlook, Apple Mail, etc.)
- EML files can be imported into other mail servers
- Opens the encrypted SQLite database using your IMAP/alias password
- Reads the Mailboxes table to discover folder structure
- For each message, decodes the mimeTree (brotli-compressed JSON) from the Messages table
- Reconstructs the full EML by walking the MIME tree and fetching attachment bodies from the Attachments table
- Exports active CardDAV contacts as their stored VCF resources, organized by address book
- Exports active CalDAV event and task resources as their stored ICS files, organized by calendar
- Packages everything into a password-protected ZIP archive
- Node.js >= 18 (if running from source)
- No Node.js required for pre-built binaries