132 lines
4.0 KiB
Plaintext
132 lines
4.0 KiB
Plaintext
# Mailcow Logs Viewer Configuration
|
|
# Copy this file to .env and fill in your values
|
|
|
|
# ============================================================================
|
|
# REQUIRED SETTINGS
|
|
# ============================================================================
|
|
|
|
# Your Mailcow instance URL (without trailing slash)
|
|
MAILCOW_URL=https://mail.example.com
|
|
|
|
# Mailcow API key (generate from System → API in Mailcow admin)
|
|
# Required permissions: Read access to logs
|
|
MAILCOW_API_KEY=your-api-key-here
|
|
|
|
# =============================================================================
|
|
# DATABASE CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# PostgreSQL credentials
|
|
POSTGRES_USER=mailcowlogs
|
|
POSTGRES_PASSWORD=changeme
|
|
POSTGRES_DB=mailcowlogs
|
|
|
|
# Database host (use 'db' for docker-compose setup)
|
|
POSTGRES_HOST=db
|
|
POSTGRES_PORT=5432
|
|
|
|
# =============================================================================
|
|
# FETCH CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# Seconds between log fetches from Mailcow
|
|
# Lower = more frequent updates, higher load on Mailcow
|
|
# Default: 60 seconds
|
|
FETCH_INTERVAL=60
|
|
|
|
# Number of records to fetch per request
|
|
# Recommended: 500 for most servers, increase if you have high email volume
|
|
# Default: 500
|
|
FETCH_COUNT_POSTFIX=500
|
|
FETCH_COUNT_RSPAMD=200
|
|
FETCH_COUNT_NETFILTER=500
|
|
|
|
# Number of days to keep logs in database
|
|
# Logs older than this will be automatically deleted
|
|
# Recommended: 7 for most cases, 30 for compliance/audit requirements
|
|
# Default: 7 days
|
|
RETENTION_DAYS=7
|
|
|
|
CORRELATION_INTERVAL=300
|
|
|
|
# Correlation expiration (minutes)
|
|
MAX_CORRELATION_AGE_MINUTES=10
|
|
|
|
# Correlation check interval (seconds)
|
|
CORRELATION_CHECK_INTERVAL=120
|
|
|
|
# =============================================================================
|
|
# BLACKLIST CONFIGURATION (Optional)
|
|
# =============================================================================
|
|
|
|
# Email addresses to exclude from logs (comma-separated, no spaces)
|
|
# These emails will NOT be stored in the database
|
|
# Use cases:
|
|
# - BCC addresses that receive all outbound mail
|
|
# - Monitoring/health check addresses
|
|
# - Internal system addresses
|
|
BLACKLIST_EMAILS=
|
|
|
|
# Examples:
|
|
# BLACKLIST_EMAILS=bcc-archive@example.com,monitor@example.com
|
|
# BLACKLIST_EMAILS=notifications@example.com
|
|
|
|
# =============================================================================
|
|
# WEB CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# Application port (internal container port)
|
|
APP_PORT=8080
|
|
|
|
# Timezone for log display (e.g., Europe/London, America/New_York)
|
|
TZ=UTC
|
|
|
|
# Application title (shown in browser tab)
|
|
APP_TITLE=Mailcow Logs Viewer
|
|
|
|
# Logo URL (optional, leave empty for no logo)
|
|
APP_LOGO_URL=
|
|
|
|
# =============================================================================
|
|
# ADVANCED CONFIGURATION (Optional)
|
|
# =============================================================================
|
|
|
|
# Log level (DEBUG, INFO, WARNING)
|
|
# Default: INFO
|
|
LOG_LEVEL=WARNING
|
|
|
|
# Enable debug mode (shows detailed errors, use only for development)
|
|
# WARNING: Never enable in production!
|
|
# Default: false
|
|
DEBUG=false
|
|
|
|
# Maximum records to return in search results
|
|
MAX_SEARCH_RESULTS=1000
|
|
|
|
# CSV export row limit
|
|
CSV_EXPORT_LIMIT=10000
|
|
|
|
# Background job workers (number of concurrent fetch jobs)
|
|
# Higher = more parallel processing but more CPU usage
|
|
SCHEDULER_WORKERS=4
|
|
|
|
# API request timeout (seconds)
|
|
MAILCOW_API_TIMEOUT=30
|
|
|
|
# =============================================================================
|
|
# AUTHENTICATION CONFIGURATION (Optional)
|
|
# =============================================================================
|
|
|
|
# Enable basic HTTP authentication
|
|
# When enabled, ALL pages and API endpoints require authentication
|
|
# Default: false (no authentication required)
|
|
AUTH_ENABLED=false
|
|
|
|
# Basic auth username
|
|
# Default: admin
|
|
AUTH_USERNAME=admin
|
|
|
|
# Basic auth password (REQUIRED if AUTH_ENABLED=true)
|
|
# Leave empty to disable authentication
|
|
# WARNING: Use a strong password in production!
|
|
AUTH_PASSWORD= |