Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
219 lines (196 loc) · 8.52 KB
/
Copy path.env.example
File metadata and controls
219 lines (196 loc) · 8.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# Server
# HTTP server port
POSTA_PORT=9000
# Environment (dev, production)
# With POSTA_ENV=production the server refuses to start on a missing, placeholder,
# or too-short POSTA_JWT_SECRET, and refuses to seed the first admin account with
# a placeholder POSTA_ADMIN_PASSWORD. Use dev for a local quick start.
POSTA_ENV=production
# Database (PostgreSQL)
POSTA_DB_HOST=localhost
POSTA_DB_USER=posta
POSTA_DB_PASSWORD=posta
POSTA_DB_NAME=posta
POSTA_DB_PORT=5432
POSTA_DB_SSL_MODE=disable
# PostgreSQL connection string (overrides individual DB settings)
POSTA_DB_URL=
# Redis
# URL overrides the settings below
POSTA_REDIS_URL=
POSTA_REDIS_ADDR=localhost:6379
POSTA_REDIS_USERNAME=
POSTA_REDIS_PASSWORD=
POSTA_REDIS_DB=0
# JWT signing secret — REQUIRED in production, 32+ characters recommended.
# Signs dashboard sessions, tracking links, and the email stamper: anyone who
# knows it can forge a session. Production refuses to start if this is empty or
# left at the placeholder below, and warns if it is shorter than 32 characters.
# Generate one with: openssl rand -hex 32
POSTA_JWT_SECRET=change-me-in-production
# Store emails without sending (useful for development)
POSTA_DEV_MODE=false
# Enable auth (login/register) rate limiting
POSTA_AUTH_RATE_LIMIT_ENABLED=true
# Hourly email limit per user
POSTA_RATE_LIMIT_HOURLY=100
# Daily email limit per user
POSTA_RATE_LIMIT_DAILY=1000
# Default admin credentials, used only to create the first account on an empty
# database. In production the password must be at least 12 characters and not a
# known placeholder, or the initial seed is refused.
POSTA_ADMIN_EMAIL=admin@example.com
POSTA_ADMIN_PASSWORD=admin1234
# Enable Swagger UI and ReDoc
POSTA_OPENAPI_DOCS=true
# Enable Prometheus metrics
POSTA_METRICS_ENABLED=false
# Daily check for a newer Posta release, shown as a banner to platform admins.
# Reads the public GitHub release list and sends nothing about this install;
# it never upgrades anything. Set to false for air-gapped deployments.
POSTA_UPDATE_CHECK=true
# Vue build directory (uncomment for development)
# POSTA_WEB_DIR=web/dist
# Public URL of the dashboard / instance
POSTA_WEB_URL=https://posta.example.com
# Public API base URL (advertised in the OpenAPI "servers" list; optional if POSTA_WEB_URL is set)
# POSTA_API_URL=https://posta.example.com
# Allowed CORS origins
POSTA_CORS_ORIGINS=*
# Worker
# Run worker in server process
POSTA_EMBEDDED_WORKER=true
# Worker concurrency
POSTA_WORKER_CONCURRENCY=10
# Email retry attempts
POSTA_WORKER_MAX_RETRIES=5
# Health, readiness and Prometheus endpoints for a dedicated worker.
# Defaults to POSTA_PORT: the server and the worker run as separate containers,
# so one port covers both and one health check command works for either.
POSTA_WORKER_HEALTH_ENABLED=true
POSTA_WORKER_HEALTH_PORT=9000
# Webhook delivery retry attempts
POSTA_WEBHOOK_MAX_RETRIES=3
# Webhook request timeout in seconds
POSTA_WEBHOOK_TIMEOUT_SECS=10
# Webhook HTTP proxy URL (optional)
# POSTA_WEBHOOK_PROXY_URL=
# Google OAuth client ID for SSO login
# POSTA_GOOGLE_OAUTH_CLIENT_ID=your-client-id
# Google OAuth client secret for SSO login
# POSTA_GOOGLE_OAUTH_CLIENT_SECRET=your-secret
# OAuth callback base URL (optional if POSTA_WEB_URL is defined)
POSTA_OAUTH_CALLBACK_URL=https://posta.example.com
# Blob storage (s3 or filesystem)
# POSTA_BLOB_PROVIDER=
# S3-compatible storage settings
# POSTA_BLOB_S3_ENDPOINT=
# POSTA_BLOB_S3_REGION=us-east-1
# POSTA_BLOB_S3_BUCKET=
# POSTA_BLOB_S3_ACCESS_KEY=
# POSTA_BLOB_S3_SECRET_KEY=
# POSTA_BLOB_S3_USE_SSL=true
# POSTA_BLOB_S3_PATH_STYLE=false
# Filesystem storage path
# POSTA_BLOB_FS_PATH=/data/attachments
# Encryption key for SMTP server passwords (AES-256-GCM)
# If empty, passwords are stored with base64 encoding only
# POSTA_ENCRYPTION_KEY=
# System SMTP server used for platform notifications (daily reports, invitations,
# password resets, security alerts).
#
# On boot these are provisioned as a real SMTP server inside the "Posta System"
# workspace, so the settings are visible and testable from the dashboard. The
# connection fields below are re-synced on every restart — rotating a password
# here and restarting is enough — while the server's label and status stay as
# the operator left them.
#
# Required: Host and From must be set for SMTP to be active
POSTA_SYSTEM_SMTP_HOST=smtp.example.com
POSTA_SYSTEM_SMTP_PORT=587
POSTA_SYSTEM_SMTP_USERNAME=notifications@example.com
POSTA_SYSTEM_SMTP_PASSWORD=secret
POSTA_SYSTEM_SMTP_FROM=notifications@example.com
# Encryption mode: none, ssl, starttls
POSTA_SYSTEM_SMTP_ENCRYPTION=starttls
# Inbound email processing
# Master toggle — enables the SMTP receiver and the /api/v1/inbound/* routes
POSTA_INBOUND_ENABLED=false
# Bind address for the built-in SMTP receiver
POSTA_INBOUND_SMTP_HOST=0.0.0.0
# SMTP listener port (use 25 publicly)
POSTA_INBOUND_SMTP_PORT=2525
# Hostname announced in EHLO / used as TLS SNI — should match the MX record
POSTA_INBOUND_HOSTNAME=posta.example.com
# Max raw message size in bytes (default 25 MiB)
POSTA_INBOUND_MAX_MESSAGE_SIZE=26214400
# Max per-attachment size in bytes (default 10 MiB)
POSTA_INBOUND_MAX_ATTACH_SIZE=10485760
# Shared secret for the generic MX-provider webhook at POST /api/v1/inbound/webhook
# Clients must send it via the X-Posta-Inbound-Secret header
# POSTA_INBOUND_WEBHOOK_SECRET=
# SMTP TLS mode: none | starttls
POSTA_INBOUND_TLS_MODE=none
# PEM cert/key paths (required when POSTA_INBOUND_TLS_MODE=starttls)
# POSTA_INBOUND_TLS_CERT_FILE=/etc/posta/tls/fullchain.pem
# POSTA_INBOUND_TLS_KEY_FILE=/etc/posta/tls/privkey.pem
# Per-IP SMTP rate limit: max sessions per window (0 disables)
POSTA_INBOUND_SMTP_RATE_LIMIT=60
# Rate-limit window in seconds
POSTA_INBOUND_SMTP_RATE_WINDOW=60
# Web form messages — receive submissions from a website form, then reply from the dashboard
# Master toggle — enables the public /api/v1/f/{key} ingest endpoint and the messages routes
POSTA_MESSAGES_ENABLED=false
# Max submission body size in bytes (per-form override available in the dashboard)
POSTA_MESSAGES_MAX_BODY_BYTES=65536
# Max size of a single uploaded attachment in bytes (attachments are off per form by default)
POSTA_MESSAGES_MAX_ATTACH_SIZE=5242880
# Per-IP submissions allowed per window (0 disables — leaves a public endpoint open to flooding)
POSTA_MESSAGES_IP_RATE_LIMIT=20
# Rate-limit window in seconds
POSTA_MESSAGES_IP_RATE_WINDOW=3600
# Per-form submissions allowed per hour
POSTA_MESSAGES_PER_FORM_HOURLY=200
# Per-sender-address submissions allowed per hour, per form
POSTA_MESSAGES_PER_EMAIL_HOURLY=5
# Per-workspace submissions allowed per day
POSTA_MESSAGES_PER_WORKSPACE_DAILY=1000
# Domain used for msg+<token>@ reply addressing so email answers rejoin the thread.
# Requires POSTA_INBOUND_ENABLED=true. Leave blank for one-directional replies.
POSTA_MESSAGES_INBOUND_DOMAIN=
# SMTP Relay — lets a workspace issue SMTP credentials for migrating existing senders
# Master toggle — enables the SMTP relay listener and the /workspaces/current/smtp-credentials routes
POSTA_SMTP_RELAY_ENABLED=false
# Bind address for the built-in SMTP relay listener (plaintext, no TLS — not for public internet)
POSTA_SMTP_RELAY_HOST=0.0.0.0
# SMTP relay listener port (separate from POSTA_INBOUND_SMTP_PORT)
POSTA_SMTP_RELAY_PORT=2526
# Hostname announced in EHLO
POSTA_SMTP_RELAY_HOSTNAME=posta.example.com
# Max raw message size in bytes (default 25 MiB)
POSTA_SMTP_RELAY_MAX_MESSAGE_SIZE=26214400
# Per-IP SMTP rate limit: max sessions per window (0 disables)
POSTA_SMTP_RELAY_RATE_LIMIT=60
# Rate-limit window in seconds
POSTA_SMTP_RELAY_RATE_WINDOW=60
# Require new users to verify their email address before they can sign in.
# When true, signup sends a verification link and login is blocked until confirmed.
POSTA_EMAIL_VERIFICATION_REQUIRED=false
# Adds a recipient to the suppression list when an
# outbound send is permanently rejected (5xx at RCPT TO, e.g. 550 user
# unknown), and stops retrying that message.
POSTA_AUTO_SUPPRESS_ON_REJECT=true
# Email verification endpoint
POSTA_EMAIL_VERIFY_ENABLED=true
# How long an address-level result is cached, in hours (default 7 days)
POSTA_EMAIL_VERIFY_CACHE_TTL_HOURS=168
# How long a domain's MX lookup is cached, in hours
POSTA_EMAIL_VERIFY_MX_CACHE_TTL_HOURS=24
# Per-user hourly cap on verification requests (0 disables the limit)
POSTA_EMAIL_VERIFY_RATE_HOURLY=1000
# Advanced
# Allow the server to boot when the binary version is older than the version
# recorded in the database (normally refused to prevent schema mismatches)
POSTA_ALLOW_DOWNGRADE=false
# Enforce hosted plan limits / quotas. Off by default.
POSTA_PLAN_ENFORCEMENT=false