From 4f6c729aecb3c5135e79638aca45d5e129bef07a Mon Sep 17 00:00:00 2001 From: hoelee Date: Wed, 12 Aug 2026 10:05:00 +0800 Subject: [PATCH] chore(shell-sync): add .env.example --- platform/shell-sync/.env.example | 93 ++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 platform/shell-sync/.env.example diff --git a/platform/shell-sync/.env.example b/platform/shell-sync/.env.example new file mode 100644 index 00000000..d03398c1 --- /dev/null +++ b/platform/shell-sync/.env.example @@ -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=user1@hotmail.com +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=user1@mailcow.com +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=user2@example.com +ACCOUNT_2_SOURCE_AUTH=password +ACCOUNT_2_SOURCE_PASS=your_source_password + +ACCOUNT_2_DEST_HOST=mail.hoelee.com +ACCOUNT_2_DEST_USER=user2@mailcow.com +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