.env.example 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. IMAP_ENABLED=true
  23. IMAP_BIND=0.0.0.0
  24. IMAP_PORTS=143:imap,993:imaps
  25. POP3_ENABLED=true
  26. POP3_BIND=0.0.0.0
  27. POP3_PORTS=110:pop3,995:pop3s
  28. MAIL_ACCESS_ALLOW_INSECURE_AUTH=false
  29. # Default outbound identity used in SPF, HELO, and Postfix myhostname.
  30. MAIL_HOSTNAME=smtp.mailhub.example.com
  31. SENDING_IP=203.0.113.10
  32. # Extra SPF mechanisms to preserve coexistence with third-party senders.
  33. # Examples: include:spf.mailjet.com include:_netblocks.m.feishu.cn
  34. DEFAULT_SPF_MECHANISMS=
  35. DNS_RESOLVERS=1.1.1.1,8.8.8.8
  36. DNS_AUTO_CHECK_ENABLED=true
  37. DNS_AUTO_CHECK_INTERVAL_MS=60000
  38. DNS_AUTO_CHECK_LIMIT=25
  39. # SMTP service used by the web API. In docker-compose this is the internal Postfix service.
  40. SMTP_HOST=postfix
  41. SMTP_PORT=25
  42. SMTP_HELO=smtp.mailhub.example.com
  43. SEND_REQUIRES_VERIFIED=false
  44. DELIVERY_TRACKING_ENABLED=true
  45. POSTFIX_LOG_POLL_INTERVAL_MS=5000
  46. # Engagement tracking uses opaque public links and a stable encryption key.
  47. TRACKING_SECRET=change-this-separate-long-random-tracking-secret
  48. ENGAGEMENT_TRACKING_ENABLED=false
  49. TRACKING_RETENTION_DAYS=180
  50. TRUST_PROXY=true
  51. # Optional deliverability headers. One-click should only be enabled when the URL accepts compliant unsubscribe POSTs.
  52. LIST_UNSUBSCRIBE_MAILTO=
  53. LIST_UNSUBSCRIBE_URL=
  54. LIST_UNSUBSCRIBE_POST_ENABLED=false
  55. FEEDBACK_ID_ENABLED=true
  56. REPORT_ABUSE_TO=
  57. CSA_COMPLAINTS_TO=
  58. # Optional bounce envelope sender. Keep disabled until this mailbox/domain receives and processes bounces.
  59. BOUNCE_ADDRESS=
  60. BOUNCE_ENVELOPE_ENABLED=false
  61. # DMARC defaults.
  62. DMARC_POLICY=none
  63. DMARC_RUA=