en
Private Email Server Hosting: Self-Hosted Encrypted Email
Running your own email server on an offshore VPS gives you complete control over your communications - no provider scanning your inbox, no metadata harvesting, no terms-of-service that can result in account suspension, and no dependency on any third-party email company. This guide covers deploying a production-grade private email server on an offshore VPS.
Need this done for your project?
We implement, you ship. Async, documented, done in days.
Why Run Your Own Email Server
Google reads your Gmail. Microsoft scans your Outlook. Even ProtonMail - despite strong encryption - holds metadata about who you communicate with and when. Running your own email server eliminates the dependency on any third-party service and gives you full control over your email infrastructure.
The advantages of self-hosted email on an offshore VPS are substantial. Your email is stored in encrypted form on a server you control - only you hold the decryption keys. No provider has the ability to scan, index, or hand over your email content because it is not their server. Metadata (who you emailed, when, and from what IP) is logged only if you configure your server to log it.
Email deliverability is a valid concern for self-hosted servers - major providers (Gmail, Outlook) apply aggressive filtering to emails from unknown servers. This is manageable with proper DNS configuration (SPF, DKIM, DMARC) and a clean IP reputation. Offshore VPS from Anubiz Host provides dedicated IPs that are not shared with spam sources, giving your email server a clean starting reputation.
For communications that must remain private - attorney-client communications, journalistic source communications, sensitive business negotiations - self-hosted encrypted email is the gold standard. End-to-end encryption via PGP/GPG, combined with a self-hosted server, ensures that even if your server is seized, the email content is encrypted and inaccessible without your private key.
Choosing a VPS for Your Email Server
Email server requirements differ from typical web server workloads. Key considerations when selecting a VPS for private email hosting:
Minimum specifications: 2 vCPU, 4GB RAM, 80GB SSD storage for a personal or small-team email server. Email indexing and search (IMAP) is memory-intensive. Storage requirements scale with inbox size and retention policy - plan for 1GB per user per year as a rough baseline.
Dedicated IP address: a dedicated IPv4 address is essential for email delivery. Shared IPs may be on spam blacklists due to previous tenants. Anubiz Host VPS plans include a dedicated IPv4 by default.
Reverse DNS (rDNS): your IP's reverse DNS record must match your mail server's hostname. This is a critical email deliverability requirement. Contact Anubiz Host support to configure rDNS for your VPS IP to match your mail domain (e.g., mail.yourdomain.com).
Port 25 availability: many hosting providers block outbound port 25 (SMTP) to prevent spam. Confirm that port 25 is not blocked for your VPS - Anubiz Host does not block standard mail ports by default.
Offshore jurisdiction for email hosting provides an important legal benefit: email stored in Iceland or Romania is not subject to US CLOUD Act compelled disclosure. Law enforcement must go through formal international legal assistance channels (which are slow and subject to judicial review) rather than issuing domestic subpoenas.
Installing and Configuring Your Mail Server
Mail-in-a-Box and docker-mailserver are two popular self-hosted email solutions that reduce the complexity of running Postfix, Dovecot, Rspamd, and other components manually.
Mail-in-a-Box provides a complete email server in a single install script on Ubuntu 22.04. It handles Postfix (SMTP), Dovecot (IMAP), Roundcube (webmail), and DNS configuration automatically:
```bash
# Run on a fresh Ubuntu 22.04 VPS
curl -s https://mailinabox.email/setup.sh | sudo bash
```
The setup wizard will prompt for your domain and admin email. Follow the DNS configuration instructions to set up SPF, DKIM, and DMARC records. This typically takes 30-60 minutes for the full setup.
docker-mailserver is an alternative for users who prefer Docker-based deployment:
```bash
# Clone the repository
git clone https://github.com/docker-mailserver/docker-mailserver.git
cd docker-mailserver
# Configure docker-compose.yml with your domain
# Generate initial SSL certificates
docker run --rm -v "$(pwd)/docker-data/certbot/certs/:/etc/letsencrypt/" -v "$(pwd)/docker-data/certbot/logs/:/var/log/letsencrypt/" -p 80:80 certbot/certbot certonly --standalone -d mail.yourdomain.com
docker compose up -d
```
Both solutions handle TLS encryption in transit (STARTTLS for SMTP, TLS for IMAP) automatically. For end-to-end encryption (content encrypted at rest and in transit), configure PGP/GPG key pairs for each user and use a mail client that supports S/MIME or OpenPGP.
Hardening and Maintaining Your Private Email Server
A self-hosted email server requires ongoing maintenance that managed email services handle automatically. Key hardening and maintenance tasks for a private offshore email server:
Spam filtering: Rspamd (included in Mail-in-a-Box) provides excellent spam filtering. Configure it to use a combination of DNSBLs (DNS blacklists), Bayesian filtering, and DMARC validation. A well-configured spam filter dramatically reduces inbox clutter without depending on Google or Microsoft's spam infrastructure.
Encryption at rest: email stored on disk should be encrypted. Dovecot supports per-user encryption where each user's maildir is encrypted with their login password. Configure this in Dovecot's configuration file if your threat model requires protection against server seizure.
Backup strategy: email data is critical. Configure encrypted, offsite backups using restic or duplicity to a secondary server or object storage. Use strong encryption keys and store them securely offline.
Log management: email servers generate extensive logs by default. Configure log rotation and retention policies. For maximum privacy, reduce log verbosity and retain logs for the minimum period needed for spam and abuse management (typically 7-14 days).
IP reputation monitoring: monitor your mail server IP against major blacklists using MXToolbox or similar services. If your IP appears on a blacklist (can happen due to compromised accounts or misconfiguration), remediate immediately to restore email deliverability.
Updates: keep Postfix, Dovecot, and all mail server components updated. Mail server vulnerabilities are actively exploited. Use unattended-upgrades on Ubuntu to apply security patches automatically.
Related Services
Why Anubiz Host
100% async — no calls, no meetings
Delivered in days, not weeks
Full documentation included
Production-grade from day one
Security-first approach
Post-delivery support included
Ready to get started?
Skip the research. Tell us what you need, and we'll scope it, implement it, and hand it back — fully documented and production-ready.