Initial commit: Multi-account IMAP sync with OAuth2 support
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
# ============================================================
|
||||
# Email Sync OAuth2 - Docker Compose Configuration
|
||||
# ============================================================
|
||||
# Copy this file to .env and edit your settings.
|
||||
# ============================================================
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Global settings
|
||||
# ------------------------------------------------------------
|
||||
|
||||
# Number of accounts to sync
|
||||
NUM_ACCOUNTS=2
|
||||
|
||||
# Sync interval in seconds (default: 21600 = 6 hours).
|
||||
# Used when SYNC_CRON is empty.
|
||||
SYNC_INTERVAL=21600
|
||||
|
||||
# Optional standard five-field cron expression. When set, it overrides
|
||||
# SYNC_INTERVAL. Example: 0 */6 * * * (every six hours)
|
||||
SYNC_CRON=
|
||||
|
||||
# Run once and exit (true/false)
|
||||
ONCE=false
|
||||
|
||||
# Token and log directories inside container
|
||||
TOKEN_DIR=/tokens
|
||||
LOG_DIR=/var/log/imapsync
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Account 1: Hotmail / Office 365 -> Mailcow (OAuth2)
|
||||
# ------------------------------------------------------------
|
||||
|
||||
ACCOUNT_1_SOURCE_HOST=outlook.office365.com
|
||||
ACCOUNT_1_SOURCE_USER=[email protected]
|
||||
ACCOUNT_1_SOURCE_AUTH=oauth2
|
||||
ACCOUNT_1_SOURCE_PROVIDER=office365
|
||||
ACCOUNT_1_SOURCE_TOKEN=/tokens/user1_hotmail.token
|
||||
|
||||
ACCOUNT_1_DEST_HOST=mail.hoelee.com
|
||||
ACCOUNT_1_DEST_USER=[email protected]
|
||||
ACCOUNT_1_DEST_PASS=your_mailcow_password
|
||||
|
||||
# Delete emails on destination that don't exist on source (true/false)
|
||||
ACCOUNT_1_DELETE=false
|
||||
|
||||
# Dry run - log what would happen without actually syncing (true/false)
|
||||
ACCOUNT_1_DRY_RUN=false
|
||||
|
||||
# Extra imapsync options (optional)
|
||||
ACCOUNT_1_EXTRA_OPTS=
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Account 2: Any standard IMAP source (password authentication)
|
||||
# ------------------------------------------------------------
|
||||
|
||||
ACCOUNT_2_SOURCE_HOST=imap.example.com
|
||||
ACCOUNT_2_SOURCE_USER=[email protected]
|
||||
ACCOUNT_2_SOURCE_AUTH=password
|
||||
ACCOUNT_2_SOURCE_PASS=your_source_password
|
||||
|
||||
ACCOUNT_2_DEST_HOST=mail.hoelee.com
|
||||
ACCOUNT_2_DEST_USER=[email protected]
|
||||
ACCOUNT_2_DEST_PASS=your_mailcow_password
|
||||
|
||||
ACCOUNT_2_DELETE=false
|
||||
ACCOUNT_2_DRY_RUN=false
|
||||
ACCOUNT_2_EXTRA_OPTS=
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Account 3+: copy an account block and increase NUM_ACCOUNTS.
|
||||
# All ACCOUNT_N_* variables from .env are passed into the container.
|
||||
# ------------------------------------------------------------
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Optional SMTP notifications
|
||||
# ------------------------------------------------------------
|
||||
|
||||
# none | batch_success | account_success | failure
|
||||
# batch_success: one email after every fully successful sync batch
|
||||
# account_success: one email for every successful account
|
||||
# failure: one email when one or more accounts fail in a batch
|
||||
NOTIFY_MODE=none
|
||||
|
||||
# Required only when NOTIFY_MODE is not none
|
||||
SMTP_HOST=
|
||||
SMTP_PORT=587
|
||||
SMTP_USER=
|
||||
SMTP_PASS=
|
||||
SMTP_FROM=
|
||||
# One or more comma-separated recipients
|
||||
SMTP_TO=
|
||||
# starttls (port 587), tls (implicit TLS, usually port 465), or none
|
||||
SMTP_TLS=starttls
|
||||
Reference in New Issue
Block a user