.env.example 3.1 KB

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