.env.example 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. APP_PORT=3025
  2. APP_BASE_URL=https://mailhub.example.com
  3. ADMIN_USER=admin
  4. ADMIN_EMAIL=admin@example.com
  5. ADMIN_PASSWORD=change-this-admin-password
  6. SESSION_SECRET=change-this-long-random-session-secret
  7. # Require administrator approval after a newly registered user verifies their email.
  8. REGISTRATION_REQUIRES_APPROVAL=false
  9. # Legacy admin send token. New users should generate their own token in the web UI.
  10. API_TOKEN=change-this-legacy-api-token
  11. SUBMISSION_ENABLED=true
  12. SUBMISSION_HOST=smtp.mailhub.example.com
  13. SUBMISSION_BIND=0.0.0.0
  14. SUBMISSION_PORTS=25:smtp,587:smtp,465:smtps,2525:smtp
  15. SUBMISSION_ALT_PORT=2525
  16. SUBMISSION_ALLOW_INSECURE_AUTH=false
  17. SUBMISSION_TLS_CERT=/certs/mailhub.example.com.crt
  18. SUBMISSION_TLS_KEY=/certs/mailhub.example.com.key
  19. # Optional host directory containing fullchain.pem and privkey.pem. Deploy and scheduled jobs sync it into ./certs.
  20. # The sync detects the running app container group, writes cert=0644/key=0640, and verifies container ports 465 and 993.
  21. MAILHUB_CERT_SOURCE_DIR=
  22. SUBMISSION_USERNAME=change-this-smtp-user
  23. SUBMISSION_PASSWORD=change-this-smtp-password
  24. # Legacy Node protocol backend only. Docker Compose always exposes Dovecot on
  25. # 143/993 and 110/995; use IMAP_BIND/POP3_BIND or a Compose override/firewall
  26. # when either public protocol must be restricted.
  27. IMAP_ENABLED=true
  28. IMAP_BIND=0.0.0.0
  29. IMAP_PORTS=143:imap,993:imaps
  30. POP3_ENABLED=true
  31. POP3_BIND=0.0.0.0
  32. POP3_PORTS=110:pop3,995:pop3s
  33. MAIL_ACCESS_ALLOW_INSECURE_AUTH=false
  34. # Docker deployments delegate IMAP/POP3 to Dovecot. The authentication bridge
  35. # is available only on the private Compose network and uses a generated secret.
  36. MAIL_ACCESS_BACKEND=dovecot
  37. DOVECOT_AUTH_ENABLED=true
  38. DOVECOT_AUTH_HOST=0.0.0.0
  39. DOVECOT_AUTH_PORT=3001
  40. DOVECOT_AUTH_SECRET_FILE=/run/secrets/dovecot_auth_secret
  41. # Low-resource hosts should keep CPU-bound password verification concurrency modest.
  42. UV_THREADPOOL_SIZE=2
  43. # Relative path for host-side migration commands. Compose overrides this with /data/maildir.
  44. MAILDIR_ROOT=./data/maildir
  45. MAILDIR_SYNC_INTERVAL_MS=300000
  46. # Default outbound identity used in SPF, HELO, and Postfix myhostname.
  47. MAIL_HOSTNAME=smtp.mailhub.example.com
  48. SENDING_IP=203.0.113.10
  49. # Extra SPF mechanisms to preserve coexistence with third-party senders.
  50. # Examples: include:spf.mailjet.com include:_netblocks.m.feishu.cn
  51. DEFAULT_SPF_MECHANISMS=
  52. DNS_RESOLVERS=1.1.1.1,8.8.8.8
  53. DNS_AUTO_CHECK_ENABLED=true
  54. DNS_AUTO_CHECK_INTERVAL_MS=60000
  55. DNS_AUTO_CHECK_LIMIT=25
  56. # SMTP service used by the web API. In docker-compose this is the internal Postfix service.
  57. SMTP_HOST=postfix
  58. SMTP_PORT=25
  59. SMTP_HELO=smtp.mailhub.example.com
  60. SEND_REQUIRES_VERIFIED=false
  61. DELIVERY_TRACKING_ENABLED=true
  62. POSTFIX_LOG_POLL_INTERVAL_MS=5000
  63. # Engagement tracking uses opaque public links and a stable encryption key.
  64. TRACKING_SECRET=change-this-separate-long-random-tracking-secret
  65. ENGAGEMENT_TRACKING_ENABLED=false
  66. TRACKING_RETENTION_DAYS=180
  67. TRUST_PROXY=true
  68. # Optional deliverability headers. One-click should only be enabled when the URL accepts compliant unsubscribe POSTs.
  69. LIST_UNSUBSCRIBE_MAILTO=
  70. LIST_UNSUBSCRIBE_URL=
  71. LIST_UNSUBSCRIBE_POST_ENABLED=false
  72. FEEDBACK_ID_ENABLED=true
  73. REPORT_ABUSE_TO=
  74. CSA_COMPLAINTS_TO=
  75. # Optional bounce envelope sender. Keep disabled until this mailbox/domain receives and processes bounces.
  76. BOUNCE_ADDRESS=
  77. BOUNCE_ENVELOPE_ENABLED=false
  78. # DMARC defaults.
  79. DMARC_POLICY=none
  80. DMARC_RUA=