BYOS Infrastructure · 7 min read · Updated 2026-11-14

Self-Hosted Haraka & Postfix SMTP with Sakvex BYOS Engine

Connect your self-hosted Postfix or Haraka MTA to Sakvex. Achieve 100% email infrastructure sovereignty, zero send fees, and automated IMAP bounce parsing.

SX
Sakvex Engineering Email Infrastructure & Deliverability Team

Introduction: The Sovereign Email Architecture

In an era of increasing cloud platform consolidation, unexpected account freezes, and aggressive per-subscriber pricing models, many engineering organizations, fintech firms, and privacy-conscious enterprises choose to operate their own dedicated Mail Transfer Agents (MTAs).

Technologies like Postfix (the rock-solid C-based open-source mail agent) and Haraka (the ultra-high-throughput Node.js event-driven SMTP server) allow organizations to dispatch millions of emails directly across dedicated IP subnets for essentially the cost of a Linux server.

However, running a private MTA creates a massive user experience void for marketing and editorial teams:

  • Postfix and Haraka have no graphical user interface.
  • There is no visual drag-and-drop template designer with Outlook VML safety.
  • There is no subscriber database, segmentation interface, or automated drip journey builder.
  • Marketers must rely on command-line shell scripts or database queries to send campaigns.
+--------------------------------------------------------------------------+
| Sovereign Self-Hosted BYOS Architecture:                                 |
|                                                                          |
| [ Marketing Team / Sakvex Visual Studio ]                                |
|   | - Drag-and-Drop Templates with Automated Outlook VML Compilers       |
|   | - Subscriber CRM, Custom Merge Tags, and Dynamic Segmentation        |
|   | - Preflight DNS Deliverability Modal & RFC 8058 One-Click Headers    |
|   v                                                                      |
| [ Authenticated Outbound TLS Socket (Port 587 STARTTLS / SASL) ]         |
|   v                                                                      |
| [ Your Dedicated Linux Server: Postfix or Haraka MTA ]                   |
|   | - Dedicated Clean IPv4 / IPv6 Subnet                                 |
|   | - Local OpenDKIM Cryptographic Key Signing                           |
|   | - Zero Per-Message Fees & 100% Data Sovereignty                      |
|   v                                                                      |
| [ Recipient Mailboxes: Gmail, Microsoft 365, Yahoo, Apple Mail ]         |
|   |                                                                      |
|   | (Undeliverable Bounces / DSNs Returned to [email protected])     |
|   v                                                                      |
| [ Dovecot IMAP Bounce Mailbox ] <--- [ Sakvex IMAP Automated Parser ]    |
+--------------------------------------------------------------------------+

By connecting your private Postfix or Haraka server to Sakvex, your team gets a world-class marketing interface backed by 100% sovereign infrastructure.


Step 1: Configuring Postfix for Secure Outbound Submission

To allow Sakvex to securely submit outbound campaigns to Postfix, configure Postfix's submission service with SASL authentication and TLS encryption on port 587:

1.1 Enable the Submission Service in /etc/postfix/master.cf

Open your Postfix master configuration file and ensure the submission service is enabled with proper security overrides:

# /etc/postfix/master.cf
submission inet n       -       y       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_sasl_type=dovecot
  -o smtpd_sasl_path=private/auth
  -o smtpd_sasl_security_options=noanonymous
  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING

1.2 Enforce Modern TLS in /etc/postfix/main.cf

Ensure Postfix mandates modern, secure ciphers for client connections:

# /etc/postfix/main.cf
smtpd_tls_cert_file = /etc/letsencrypt/live/mail.yourbrand.com/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/mail.yourbrand.com/privkey.pem
smtpd_tls_security_level = may
smtpd_tls_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
smtpd_tls_ciphers = high
smtpd_tls_mandatory_ciphers = high

Reload Postfix using sudo systemctl reload postfix.


Step 2: Configuring Haraka for High-Throughput Socket Ingestion

For high-volume senders needing tens of thousands of messages dispatched per minute, Haraka provides an asynchronous, event-driven SMTP pipeline written in Node.js.

2.1 Enable Authentication and TLS Plugins

In your Haraka installation directory (/etc/haraka or ~/.haraka):

Edit config/plugins to enable TLS and authentication:

tls
auth/auth_flat_file
dkim_sign
rcpt_to.in_host_list
queue/discard # or queue/smtp_forward

2.2 Configure Haraka TLS (config/tls.ini)

[main]
cert = /etc/letsencrypt/live/mail.yourbrand.com/fullchain.pem
key = /etc/letsencrypt/live/mail.yourbrand.com/privkey.pem
ciphers = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256
min_version = TLSv1.2

2.3 Configure SMTP Credentials (config/auth_flat_file.ini)

[users]
sakvex_sender = SecureGeneratedPassword123!

Step 3: Setting Up Reverse DNS (rDNS), SPF, and OpenDKIM

A self-hosted MTA will be instantly rejected by Gmail and Microsoft if your server's IP address lacks a valid Pointer (PTR) Record or fails cryptographic authentication:

3.1 PTR Record (Reverse DNS)

Contact your VPS or dedicated server hosting provider (Hetzner, OVH, DigitalOcean, AWS) and set your server's public IP reverse DNS to match your mail hostname:

IP Address:  198.51.100.25
PTR Record:  mail.yourbrand.com

3.2 SPF Configuration

Publish an SPF record that authorizes your server's IPv4 and IPv6 addresses:

Type:  TXT
Name:  @ (or yourbrand.com)
Value: "v=spf1 ip4:198.51.100.25 -all"

3.3 OpenDKIM 2048-Bit Signing

Install OpenDKIM to automatically sign outbound mail headers. In /etc/opendkim.conf, configure your signing table and publish the public key in your DNS records:

Type:  TXT
Name:  default._domainkey.yourbrand.com
Value: "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA..."

Step 4: Automated IMAP Bounce Handling in Sakvex

One of the largest hurdles of self-hosting is handling non-delivery reports (bounces). When an address is invalid, the receiving mailbox provider generates an RFC 3464 Delivery Status Notification (DSN) back to your envelope sender (e.g., [email protected]).

Unlike third-party platforms that require proprietary webhooks, Sakvex includes an Integrated IMAP/POP3 Raw Bounce Mailbox Parser:

+--------------------------------------------------------------+
| Sakvex IMAP Bounce Configuration:                            |
|                                                              |
| Server:   mail.yourbrand.com                                 |
| Port:     993  [x] SSL/TLS                                   |
| Username: [email protected]                               |
| Password: ******************                                 |
| Interval: Every 5 minutes                                    |
|                                                              |
| Actions:                                                     |
| [x] Parse 5.x.x Hard Bounces -> Quarantine Subscriber        |
| [x] Parse 4.x.x Soft Bounces -> Increment Retry Counter      |
| [x] Auto-purge processed bounce notification emails          |
+--------------------------------------------------------------+

Sakvex connects to your bounce mailbox on a background cron schedule, extracts the recipient address and machine-readable SMTP status codes (550 5.1.1 User Unknown, 554 5.7.1 Relay Denied), and updates your subscriber records in real time.


Step 5: Connecting Your Private MTA to Sakvex

Connecting Postfix or Haraka into Sakvex takes two minutes:

  1. In the Sakvex dashboard, open Settings > SMTP Relay.
  2. Input your connection parameters:
    • Host: mail.yourbrand.com
    • Port: 587 (STARTTLS) or 465 (SSL)
    • Username: Your SASL username (e.g., sakvex_sender)
    • Password: Your SASL password
    • Sender Email: [email protected]
    • Sender Name: Your Brand
  3. Click Save Relay & Verify Connection.

Sakvex runs an automated socket handshake test, verifying TLS encryption and SASL credentials.


Deliverability QA: Preflight Modal and RFC 8058 Headers

Before you send a campaign through your private MTA, Sakvex runs essential deliverability checks:

  • Preflight DNS Modal: Queries public nameservers to confirm that your PTR record matches your hostname, your SPF record matches your server IP, and your DMARC alignment passes.
  • RFC 8058 One-Click Headers: Injected automatically into every outgoing payload:
List-Unsubscribe: <https://sakvex.com/api/unsubscribe/one-click?token=9b2d4f>, <mailto:[email protected]?subject=one-click>
List-Unsubscribe-Post: List-Unsubscribe=One-Click
  • Outlook VML Rendering: Automatically ensures button and table layouts render cleanly across all versions of Outlook desktop.

Conclusion: Total Sovereignty at Zero Per-Message Cost

Self-hosting your own Postfix or Haraka MTA gives your organization the ultimate in privacy, data ownership, and infrastructure independence.

By pairing your private mail server with Sakvex, your team gets the speed, design sophistication, and deliverability intelligence of a modern SaaS marketing platform without sacrificing an ounce of control.

Interactive Cost Model

Model Your BYOS Economics

Compare a commercial plan with a Sakvex software fee plus a provider transport estimate. Confirm current provider pricing before purchasing.

50,000
5,000 100,000 200,000 300,000+
150,000
10,000 300,000 600,000 1,000,000+
BYOS Economics Formula
Sakvex charges a predictable monthly software fee. Sending is billed directly by your SMTP provider; this calculator uses an editable estimate and is not a quote.
Estimated Monthly Difference
Model estimate
Difference $296.00 per month
Equal to $3,552.00 in annual budget reclaimed
Mailchimp Cost
$350.00
/ month
Sakvex + SES Cost
$54.00
/ month total
Sakvex Platform Fee: $39.00/mo
AWS SES Wholesale Delivery: $15.00/mo
Compare Your Setup →

14-day free trial · Zero credit card required upfront

Frequently Asked Questions

Self-hosted MTAs like Postfix or Haraka provide complete IP and data sovereignty with zero per-message sending costs. However, they lack visual email builders, subscriber segmentation, preflight deliverability checks, and bounce management UIs. Sakvex provides that entire marketing application layer.

Unlike closed SaaS tools that require proprietary webhooks, Sakvex features an integrated IMAP/POP3 Raw Bounce Mailbox Parser. Sakvex logs into your bounce mailbox, parses RFC 3464 delivery status notifications (DSNs), extracts 5xx failure codes, and quarantines bad addresses automatically.

Configure Postfix with SASL authentication on port 587 with STARTTLS or port 465 with implicit SSL/TLS, enforcing secure ciphers (TLSv1.2 or TLSv1.3).

Yes. Sakvex Agency plans support multi-workspace tenancy, allowing you to bind different Postfix relays, IP interfaces, and sending domains to distinct client accounts.
Enterprise Architecture Built into the Sakvex Platform Engine:
Journey Automation Quiet hours protection (9 AM – 6 PM) in contact local timezone
Campaign Scheduling Timezone calendar dispatches with automated preflight QA
Public Signup Forms Invisible bot honeypot protection & double opt-in tokens
BYOS SMTP Freedom Wholesale delivery via AWS SES, Postmark, or private MTA
Zero Per-Contact Surcharges

Take Full Control of Your Email Delivery Infrastructure

Connect your AWS SES, Postmark, or custom SMTP server to Sakvex in under 3 minutes. Experience wholesale email economics with agency-grade marketing automation.