Files
2025-07-17 22:49:42 +08:00

96 lines
2.6 KiB
Bash

# Log level: trace, debug, info, warn, error
RUSTMAILER_LOG_LEVEL=info
# HTTP server port
RUSTMAILER_HTTP_PORT=15630
# gRPC server port
RUSTMAILER_GRPC_PORT=16630
# Public URL for this RustMailer instance
RUSTMAILER_PUBLIC_URL=http://localhost:15630
# Enable ANSI-colored logs (for terminal output)
RUSTMAILER_ANSI_LOGS=false
# Enable JSON-formatted logs (for machine parsing)
RUSTMAILER_JSON_LOGS=false
# Persist logs to files
RUSTMAILER_LOG_TO_FILE=false
# Max number of server log files to retain
RUSTMAILER_MAX_SERVER_LOG_FILES=5
# Number of worker threads used for sending emails
RUSTMAILER_SEND_MAIL_WORKERS=10
# Encryption password for stored secrets (change this in production!)
RUSTMAILER_ENCRYPT_PASSWORD=change-this-default-password-now
# Root directory for persistent storage (adjust to your environment)
RUSTMAILER_ROOT_DIR=/data/rustmailer
# (Optional) Metadata cache size in bytes (leave empty to disable)
RUSTMAILER_METADATA_CACHE_SIZE=
# (Optional) Task queue cache size in bytes (leave empty to disable)
RUSTMAILER_TASK_QUEUE_CACHE_SIZE=
# (Optional) Envelope cache size in bytes (leave empty to disable)
RUSTMAILER_ENVELOPE_CACHE_SIZE=
# Enable API access token validation
RUSTMAILER_ENABLE_ACCESS_TOKEN=false
# Enable email open/click tracking
RUSTMAILER_EMAIL_TRACKING_ENABLED=false
# IP address to bind the HTTP and gRPC servers to (default: 0.0.0.0)
RUSTMAILER_BIND_IP=
# Comma-separated list of allowed CORS origins (e.g. https://app.example.com)
RUSTMAILER_CORS_ORIGINS=
# Cache duration (in seconds) for CORS preflight responses
RUSTMAILER_CORS_MAX_AGE=86400
# Enable gRPC server
RUSTMAILER_GRPC_ENABLED=true
# Enable HTTPS for REST API server
RUSTMAILER_ENABLE_REST_HTTPS=false
# Enable HTTPS for gRPC server
RUSTMAILER_ENABLE_GRPC_HTTPS=false
# Compression algorithm for gRPC (none, gzip, zstd)
RUSTMAILER_GRPC_COMPRESSION=none
# Enable HTTP response compression (gzip or brotli)
RUSTMAILER_HTTP_COMPRESSION_ENABLED=true
# Number of workers to handle webhook/event delivery
RUSTMAILER_EVENT_HOOK_WORKERS=10
# Max size (in bytes) of email content payloads
RUSTMAILER_MAX_EMAIL_CONTENT_LENGTH=10000
# Cleanup task run interval (in hours)
RUSTMAILER_CLEANUP_INTERVAL_HOURS=72
# Directory to store backup files (leave empty to disable backups)
RUSTMAILER_BACKUP_DIR=
# Maximum number of backup files to retain
RUSTMAILER_MAX_BACKUPS=10
# Tracking URL used in emails (e.g. for open tracking)
RUSTMAILER_EMAIL_TRACKING_URL=http://localhost:15630/email-track
# Enable storing metadata entirely in memory
RUSTMAILER_METADATA_MEMORY_MODE_ENABLED=false
# Interval (in seconds) to persist metadata snapshot to disk
RUSTMAILER_METADATA_SNAPSHOT_INTERVAL_SECS=900