Advanced Configuration

Master advanced features and configuration options for production-like testing environments.

SSL/TLS Support

MailCatcher NG supports both STARTTLS and direct TLS (SMTPS) for encrypted SMTP connections. This is useful for testing email delivery in staging environments that require secure connections.

Generate a Self-Signed Certificate

Generate Certificate
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes

This creates:

  • cert.pem: Certificate file
  • key.pem: Private key file

Start with SSL/TLS

Docker with SSL/TLS
docker run -d -p 1080:1080 -p 1025:1025 -p 1465:1465 \
  -v $(pwd)/cert.pem:/etc/mailcatcher/cert.pem \
  -v $(pwd)/key.pem:/etc/mailcatcher/key.pem \
  stpaquet/alpinemailcatcher \
  --smtp-ssl --smtp-ssl-cert /etc/mailcatcher/cert.pem --smtp-ssl-key /etc/mailcatcher/key.pem

⚠️ Note: This enables both STARTTLS on port 1025 and direct TLS (SMTPS) on port 1465.

UTF-8 & International Content

MailCatcher NG fully supports modern SMTP capabilities for UTF-8 and international content.

SMTP Capabilities

  • SMTPUTF8 (RFC 6531): Allows clients to send UTF-8 directly without encoding
  • 8BITMIME (RFC 6152): Accepts 8bit transfer encoding for UTF-8 content
  • Multiple encodings: 7bit, 8bit, base64, and quoted-printable

Test UTF-8 Content

Send Test Emails
SMTP_HOST=127.0.0.1 SMTP_PORT=1025 ruby send_example_emails.rb

Email Authentication

MailCatcher NG verifies and displays email authentication results:

DMARC

Domain-based Message Authentication, Reporting and Conformance

DKIM

DomainKeys Identified Mail signature verification

SPF

Sender Policy Framework authorized sender verification

Message Management

Limit Message Storage

Prevent memory usage from growing unbounded:

Limit Messages to 1000
docker run -d -p 1080:1080 -p 1025:1025 \
  stpaquet/alpinemailcatcher \
  --messages-limit 1000

Disable Quit Function

Prevent accidental server shutdown:

Disable Quit
docker run -d -p 1080:1080 -p 1025:1025 \
  stpaquet/alpinemailcatcher \
  --no-quit

HTTP Path Prefix

For reverse proxy or nested deployment scenarios:

HTTP Path Prefix
docker run -d -p 1080:1080 -p 1025:1025 \
  stpaquet/alpinemailcatcher \
  --http-path /mail

Access the web interface at http://127.0.0.1:1080/mail/

Keyboard Navigation

The web interface supports keyboard shortcuts for efficient navigation:

  • Previous message
  • Next message
  • ? Show help