email_migration/.env.template
Elmar Sönser 6ef7979445 feat: Add duplicate detection, folder management, and enhanced UI
- Implement smart duplicate email detection using Message-ID and fallback signatures
- Add automatic folder creation with existing folder detection and reuse
- Enhance terminal output with colors, progress bars, and professional formatting
- Replace import folder functionality with original folder structure preservation
- Add comprehensive statistics tracking (duplicates, folder creation, etc.)
- Improve error handling with graceful date format fallbacks
- Add universal terminal compatibility with line-based formatting
- Update documentation and configuration files
- Provide clear user feedback for all migration decisions

Migration now intelligently skips duplicates, preserves folder structure,
and provides detailed feedback on what was migrated vs. what was skipped.
2025-09-24 15:21:01 +02:00

124 lines
4.6 KiB
Text

# ============================================================================
# EMAIL MIGRATION CONFIGURATION FILE
# ============================================================================
# Copy this file to '.env' and fill in your actual values.
# NEVER commit the .env file to version control - it contains passwords!
# ============================================================================
# SOURCE EMAIL ACCOUNT (migrating FROM) - Host Europe Example
# ============================================================================
# SOURCE_IMAP_SERVER: IMAP server hostname
# Host Europe: wpxxxxxxxx.mail.server-he.de | Gmail: imap.gmail.com | Outlook: outlook.office365.com
SOURCE_IMAP_SERVER=wp123456.mail.server-he.de
# SOURCE_IMAP_PORT: IMAP port number
# 993 (SSL recommended) | 143 (TLS/STARTTLS)
SOURCE_IMAP_PORT=993
# SOURCE_EMAIL: Your source email address
# Required if SOURCE_USERNAME is empty, optional if username is provided
# Example: user@yourdomain.de
SOURCE_EMAIL=user@example-domain.de
# SOURCE_USERNAME: Login username (alternative to email)
# Required if SOURCE_EMAIL is empty, optional if email is provided
# Some providers use separate username for login (e.g. hosteurope123, mail_user)
# Host Europe: often uses email account name or specific username
SOURCE_USERNAME=
# SOURCE_PASSWORD: Email account password
# Use your Host Europe email password (NOT app password needed here)
SOURCE_PASSWORD=your_hosteurope_password
# SOURCE_IMAP_USE_SSL: Use SSL encryption
# True (port 993) | False (port 143 with TLS)
SOURCE_IMAP_USE_SSL=True
# ============================================================================
# DESTINATION EMAIL ACCOUNT (migrating TO) - Securehost.de Example
# ============================================================================
# DEST_IMAP_SERVER: Destination IMAP server
# Securehost.de: mail.securehost.de | Common: mail.yourdomain.de | imap.provider.de
DEST_IMAP_SERVER=mail.securehost.de
# DEST_IMAP_PORT: Destination IMAP port
# 993 (SSL) | 143 (TLS/STARTTLS)
DEST_IMAP_PORT=993
# DEST_EMAIL: Your destination email address
# Required if DEST_USERNAME is empty, optional if username is provided
# Example: user@securehost.de
DEST_EMAIL=user@securehost.de
# DEST_USERNAME: Login username for destination (alternative to email)
# Required if DEST_EMAIL is empty, optional if email is provided
# Some hosting providers use separate username (e.g. user123, cpanel_user)
# Securehost.de: typically uses email or specific username
DEST_USERNAME=
# DEST_PASSWORD: Destination email password
# Your securehost.de email password
DEST_PASSWORD=your_securehost_password
# DEST_IMAP_USE_SSL: Use SSL for destination
# True (recommended) | False
DEST_IMAP_USE_SSL=True
# ============================================================================
# FOLDER STRUCTURE
# ============================================================================
#
# This script preserves the original folder structure from your source account:
# - INBOX emails go to INBOX
# - Sent emails go to Sent folder
# - Custom folders are recreated on the destination
#
# Folders that do not exist on the destination will be created automatically.
#
# ============================================================================
# FOLDER FILTERING
# ============================================================================
# INCLUDE_FOLDERS: Only migrate these folders (comma-separated)
# Empty = migrate all folders
# Host Europe common folders: INBOX,Sent,Drafts,Trash
INCLUDE_FOLDERS=
# EXCLUDE_FOLDERS: Skip these folders (comma-separated)
# Recommended: skip trash and spam folders
EXCLUDE_FOLDERS=Trash,Spam,Junk
# ============================================================================
# MIGRATION SETTINGS
# ============================================================================
# BATCH_SIZE: Emails processed at once
# 10 (conservative) | 50 (balanced) | 100 (aggressive)
BATCH_SIZE=50
# PRESERVE_FLAGS: Keep read/unread status
# True (recommended) | False
PRESERVE_FLAGS=True
# PRESERVE_DATES: Keep original email dates
# True (recommended) | False
PRESERVE_DATES=True
# ============================================================================
# TECHNICAL SETTINGS
# ============================================================================
# IMAP_TIMEOUT: Connection timeout in seconds
# 60 (default) | 120 (slow connections) | 30 (fast connections)
IMAP_TIMEOUT=60
# LOG_LEVEL: Logging detail level
# INFO (recommended) | DEBUG (troubleshooting) | ERROR (minimal)
LOG_LEVEL=INFO
# TEMP_DOWNLOAD_DIR: Temporary files directory
# ./temp_emails (default) | /tmp/emails | C:\Temp\emails
TEMP_DOWNLOAD_DIR=./temp_emails