mailvina
DocsSelf-hosting & configuration ▾

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.

VariableDescription
DB_HOST, DB_PORT, DB_USER, DB_PASSWORD, DB_NAMEMySQL / MariaDB connection. Set DB_SSL=1 to require TLS and DB_POOL_SIZE to tune connections (default 10)
SECRETSigns 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_DOMAINPublic URL and your brand/sending domain used in DNS instructions
DELIVERY_MODElog (simulate), mx (direct delivery on port 25) or relay (SMTP_RELAY_URL)
HELO_HOSTNAMEHostname with matching PTR record
SMTP_PORT, SMTPS_PORTCustomer SMTP relay ports (0 disables)
INBOUND_PORTBounce/complaint receiver; use 25 in production
DNS_VERIFYstrict checks real DNS; skip auto-verifies (development)
ADMIN_EMAIL, ADMIN_PASSWORDBootstrap admin for the operator panel

DNS you must publish

  • spf.APP_DOMAIN TXT listing your sending IPs: v=spf1 ip4:203.0.113.10 -all
  • feedback-smtp.APP_DOMAIN A 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_DOMAIN itself 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.