Files
docker-postfix/env.sample
T

112 lines
3.3 KiB
Plaintext

# ============================================
# Postfix SMTP Relay - Environment Variables
# ============================================
# Copy this file to .env and configure your settings
# Supports: Maileroo, Mailtrap, SendGrid, and generic SMTP servers
# ============================================
# General Configuration
# ============================================
# Timezone (default: America/New_York)
TIMEZONE='America/New_York'
# Domain for outgoing mail
DOMAIN=example.com
# Server hostname (optional - defaults to container hostname)
SERVER_HOSTNAME=mail.example.com
# Port to expose on host (default: 25)
SMTP_LISTEN_PORT=25
# Data folder for logs, mail, and spool (default: current directory)
DATA_FOLDER=./data
# Optional: Custom networks to allow relay (comma-separated CIDR notation)
# SMTP_NETWORKS=192.168.1.0/24,10.0.0.0/8
# Optional: Add custom header tag to relayed messages
# SMTP_HEADER_TAG=MyRelay
# Debug mode (yes/no) - enables verbose logging
DEBUG=no
# ============================================
# SMTP Provider Configuration
# Choose ONE of the following configurations
# ============================================
# --------------------------------------------
# Option 1: Maileroo (Current Configuration)
# --------------------------------------------
SMTP_SERVER='smtp.maileroo.com'
SMTP_PORT=587
SMTP_USERNAME=noreply@example.com
SMTP_PASSWORD=your_maileroo_password_here
# --------------------------------------------
# Option 2: Mailtrap
# --------------------------------------------
# SMTP_SERVER='live.smtp.mailtrap.io'
# SMTP_PORT=587
# SMTP_USERNAME=your_mailtrap_username
# SMTP_PASSWORD=your_mailtrap_password
# For Mailtrap Sandbox (testing):
# SMTP_SERVER='sandbox.smtp.mailtrap.io'
# SMTP_PORT=2525
# SMTP_USERNAME=your_mailtrap_sandbox_username
# SMTP_PASSWORD=your_mailtrap_sandbox_password
# --------------------------------------------
# Option 3: SendGrid
# --------------------------------------------
# SMTP_SERVER='smtp.sendgrid.net'
# SMTP_PORT=587
# SMTP_USERNAME=apikey
# SMTP_PASSWORD=your_sendgrid_api_key_here
# --------------------------------------------
# Option 4: Generic SMTP Server
# --------------------------------------------
# SMTP_SERVER='smtp.example.com'
# SMTP_PORT=587
# SMTP_USERNAME=your_username
# SMTP_PASSWORD=your_password
# --------------------------------------------
# Option 5: Gmail (requires app password)
# --------------------------------------------
# SMTP_SERVER='smtp.gmail.com'
# SMTP_PORT=587
# SMTP_USERNAME=your_email@gmail.com
# SMTP_PASSWORD=your_app_password
# --------------------------------------------
# Option 6: Office 365 / Outlook
# --------------------------------------------
# SMTP_SERVER='smtp.office365.com'
# SMTP_PORT=587
# SMTP_USERNAME=your_email@outlook.com
# SMTP_PASSWORD=your_password
# ============================================
# Notes
# ============================================
#
# 1. The container automatically detects /16 subnet for relay
# Additional networks can be added via SMTP_NETWORKS
#
# 2. All logs are sent to stderr and visible via:
# docker logs postfix-relay
#
# 3. TLS is automatically enabled for known providers
# (Maileroo, Mailtrap, SendGrid)
#
# 4. Health check monitors Postfix status every 30 seconds
#
# 5. For SendGrid, username must be "apikey" (literal string)
#
# ============================================