DocsSelf-hosting & configuration ▾
IntroductionQuickstartAuthenticationSending emailDomainsAPI keysSMTP relayWebhooksTemplatesBroadcastsAudiences & contactsSuppression listOpen & click trackingIP warm-upDeliverabilityAnalytics & logsLimits & errorsSelf-hosting & configurationEmailsDomainsAudiences & contactsBroadcastsTemplatesWebhooksAPI keys, suppressions, metrics
Reference
Self-hosting & configuration
Mailvina is a Next.js app with a built-in send queue, SMTP relay and bounce receiver, backed by MySQL 8 or MariaDB 10.5+. Configure it with environment variables (see .env.example). Tables are created and migrated automatically on start-up.
| Variable | Description |
|---|---|
DB_HOST, DB_PORT, DB_USER, DB_PASSWORD, DB_NAME | MySQL / MariaDB connection. Set DB_SSL=1 to require TLS and DB_POOL_SIZE to tune connections (default 10) |
SECRET | Signs sessions and tracking links and encrypts DKIM private keys. Set it explicitly in production and never change it, or existing DKIM keys can’t be decrypted |
APP_URL, APP_DOMAIN | Public URL and your brand/sending domain used in DNS instructions |
DELIVERY_MODE | log (simulate), mx (direct delivery on port 25) or relay (SMTP_RELAY_URL) |
HELO_HOSTNAME | Hostname with matching PTR record |
SMTP_PORT, SMTPS_PORT | Customer SMTP relay ports (0 disables) |
INBOUND_PORT | Bounce/complaint receiver; use 25 in production |
DNS_VERIFY | strict checks real DNS; skip auto-verifies (development) |
ADMIN_EMAIL, ADMIN_PASSWORD | Bootstrap admin for the operator panel |
DNS you must publish
spf.APP_DOMAINTXT listing your sending IPs:v=spf1 ip4:203.0.113.10 -allfeedback-smtp.APP_DOMAINA record pointing at the host running the inbound receiver on port 25- PTR (reverse DNS) for every sending IP matching its HELO hostname
- SPF/DKIM/DMARC for
APP_DOMAINitself so system email is authenticated
Direct delivery needs outbound port 25, which many cloud providers block by default. Ask your provider to unblock it, or use DELIVERY_MODE=relay.