You can successfully set up a **self hosted email 2026** server on a VPS with high deliverability by choosing a provider that allows port 25, securing a clean IP with a configured PTR record, and deploying a modern mail stack like Mailcow on a VPS with at least 2 vCPU and 4 GB RAM.
Why choose self hosted email on a VPS in 2026, and who is it for?
In an era of cloud solutions and SaaS services, the idea of deploying your own mail server might seem outdated. However, for specific tasks and user categories, a **self-hosted email server on a VPS** remains an optimal choice. It provides complete control over data, configuration, security, and sending policies, which is critical for businesses that value independence and customization.
Pros and cons of self-hosted email
Advantages:
- Full control and privacy: Your data is stored on your server, under your management. No third-party usage policies or content scanning.
- Configuration flexibility: You can configure the server for any unique requirements, integrate it with other systems, or use specific anti-spam filters or routing rules.
- Cost savings at scale: For companies with a large number of employees (50-100 or more) or a high volume of transactional emails, the cost of owning your own server can be lower than subscribing to expensive cloud services.
- Improved deliverability for specific tasks: With proper configuration and warm-up, a self-hosted server can ensure better deliverability for mailings that large providers might mistakenly flag as spam.
- Provider independence: You are not tied to the terms of service, pricing policies, or potential outages of one specific service provider.
Disadvantages:
- Complexity of setup and maintenance: Requires deep knowledge in Linux administration, network protocols, DNS, security, and mail systems.
- Deliverability responsibility: All issues related to IP address reputation, blacklisting, and warm-up fall on your shoulders.
- Resource requirements: A reliable VPS or dedicated server is needed, as well as time and resources for monitoring and troubleshooting.
- Security risks: An incorrectly configured server can become a source of spam or be compromised.
When a self-hosted email server isn't necessary (and a managed solution is better)
Despite all the advantages, **self hosted email 2026** is not a solution for everyone. If you don't have an in-house system administrator, aren't prepared to spend time learning all the nuances, or only need a few mailboxes, it's much simpler and more reliable to use ready-made SaaS solutions like Google Workspace, Microsoft 365, Zoho Mail, or specialized transactional email services (SendGrid, Mailgun). These services handle all the headaches of deliverability, security, and maintenance, offering predictable costs and a high SLA. We discussed how to choose a server for email hosting in a separate article.
Choosing the best VPS for email: what's critical for deliverability?
Choosing the right VPS provider and plan is the first and one of the most crucial steps towards successfully deploying your own mail server with high deliverability. Not every VPS is suitable for this task.
Clean IP address and subnet reputation
The foundation of your email deliverability is the reputation of the IP address from which they are sent. When choosing VPS hosting, it is crucial to obtain a **clean IP address** that has not been previously used for sending spam. If the IP is already on blacklists, your emails will automatically go to spam, regardless of perfect SPF, DKIM, and DMARC configuration.
Equally important is the reputation of the entire subnet allocated by the provider. Some hosts specialize in "cheap" traffic, which often leads to their IP ranges being "spammy." Ask your provider if they offer clean IP addresses and what measures they take to maintain their network's reputation. At Valebyte, we meticulously monitor the quality of our IP addresses and offer replacement options if reputation issues arise.
PTR record: a mandatory requirement
A **PTR record (Reverse DNS)** is a reverse DNS record that links an IP address to a domain name. Recipient mail servers almost always check for the presence and matching of a PTR record to the sender's IP address. The absence or mismatch of a PTR record with your domain name (e.g., mail.vashdomen.ru) is one of the main reasons emails go to spam. Ensure that your VPS provider allows you to configure PTR records for your IP addresses. At Valebyte, you can easily configure PTR records through the control panel.
Open port 25: a crucial filter when choosing hosting
Port 25 is the standard port for sending mail between servers (SMTP). Many VPS providers block port 25 by default to combat spam. This is a significant obstacle for a **VPS for email**. Before renting a VPS, be sure to clarify whether outgoing traffic on port 25 is allowed, or if a special request is required to open it. Some providers may require an IP address "warm-up" or additional information about your activities before opening the port. Valebyte, as a provider focused on experienced users and businesses, offers the ability to work with port 25, understanding its importance for self-hosted solutions.
VPS resource requirements for email
For a small corporate mail server or personal use, VPS requirements won't be exorbitant. However, it's important to have sufficient resources for stable operation of the mail stack, anti-spam filters, and potential growth. Below is an approximate table showing what VPS might be needed for different email server usage scenarios.
For 50 active mailboxes processing up to 1000 emails per day, 2 vCPU, 4 GB RAM, and an 80 GB NVMe disk are sufficient.
| Active Mailboxes | vCPU | RAM | Disk | Port Speed | Price (approx., Valebyte) |
|---|---|---|---|---|---|
| 1-10 (personal/small business) | 1-2 | 2 GB | 40 GB NVMe | 1 Gbps | From $5/month |
| 10-50 (medium business) | 2-4 | 4-8 GB | 80 GB NVMe | 1 Gbps | From $10/month |
| 50-200 (large business/mailings) | 4-8 | 8-16 GB | 160-320 GB NVMe | 1 Gbps | From $25/month |
| 200+ (high-load) | 8+ | 16+ GB | 320 GB NVMe+ | 1 Gbps+ | From $50/month |
The choice between a home server and renting a VPS for email is clear: a VPS provides stability, reliable bandwidth, a clean IP, and professional support, all of which are critical for deliverability.
Looking for a reliable server for your projects?
VPS from $10/month and dedicated servers from $9/month with NVMe, DDoS protection, and 24/7 support.
View offers →Preparing your VPS for mail server installation
Before proceeding with the installation of mail server software, you need to perform basic operating system and DNS record configuration.
Basic OS configuration and security
1. System Update: Always start by updating your OS to the latest version.
sudo apt update && sudo apt upgrade -y # For Debian/Ubuntu
sudo dnf update -y # For CentOS/Fedora
2. Set Hostname: Set the Fully Qualified Domain Name (FQDN) for your server, which will be used in the PTR record, for example, mail.vashdomen.ru.
sudo hostnamectl set-hostname mail.vashdomen.ru
3. NTP Configuration: Synchronize the server time for correct certificate and log operation.
sudo apt install ntp # For Debian/Ubuntu
sudo systemctl enable ntp && sudo systemctl start ntp
4. Firewall Configuration (UFW/firewalld): Open the necessary ports: 22 (SSH), 25 (SMTP), 80 (HTTP), 443 (HTTPS), 143 (IMAP), 993 (IMAPS), 110 (POP3), 995 (POP3S).
sudo ufw allow 22/tcp
sudo ufw allow 25/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 143/tcp
sudo ufw allow 993/tcp
sudo ufw allow 110/tcp
sudo ufw allow 995/tcp
sudo ufw enable
5. SSH Security: Use SSH keys, disable password login for root, and change the default SSH port.
Setting up DNS records: A, MX
These records must be configured with your DNS provider (domain registrar or Valebyte DNS servers, if you use them).
- A-record for the domain: Points to your mail server.
mail.vashdomen.ru. IN A ВАШ_IP_АДРЕС_VPS - MX-record: Tells mail servers where to send emails for your domain. The priority is usually 10.
vashdomen.ru. IN MX 10 mail.vashdomen.ru.
Ensure that the PTR record for ВАШ_IP_АДРЕС_VPS points to mail.vashdomen.ru. You configure this record in your VPS provider's control panel (e.g., in your Valebyte account).
Mailcow installation: a modern, all-in-one mail server
In 2026, many mail stacks exist, but for ease of deployment, rich functionality, and an active community, **Mailcow installation** is one of the best solutions. Mailcow combines Postfix, Dovecot, Nginx, ClamAV, SpamAssassin, SOGo (web interface), Redis, Rspamd, and other components into a single Docker container.
Why Mailcow? Features overview
- All-in-one: Mailcow provides a complete set of tools for a mail server, including a web interface for management, anti-spam, antivirus, calendars, and contacts.
- Docker containers: Simplifies installation, updates, and maintenance. Components are isolated from each other, which increases stability.
- Ease of management: An intuitive web interface allows you to easily create mailboxes, domains, configure SPF, DKIM, DMARC, and monitor server status.
- Built-in security features: Rspamd for spam filtering, ClamAV for antivirus, Fail2ban for brute-force protection.
- Let's Encrypt support: Automatic acquisition and renewal of SSL certificates for all services.
Step-by-step Mailcow installation (brief, with commands)
It is assumed that Docker and Docker Compose are installed on your VPS. If not, install them first.
1. Install Git and clone the Mailcow repository:
sudo apt install git -y # For Debian/Ubuntu
git clone https://github.com/mailcow/mailcow-dockerized
cd mailcow-dockerized
2. Create the configuration file:
cp mailcow.conf.default mailcow.conf
3. Edit mailcow.conf:
Open the file and set your Fully Qualified Domain Name (FQDN) for the MAILCOW_HOSTNAME variable. This should be the same name as in your PTR record (e.g., mail.vashdomen.ru).
MAILCOW_HOSTNAME=mail.vashdomen.ru
4. Generate DKIM keys (optional, but recommended):
./generate_config.sh
5. Start Mailcow:
docker compose pull
docker compose up -d
6. Wait for all containers to start: This may take a few minutes. Once started, you can access the Mailcow web interface at https://mail.vashdomen.ru (or via the IP address if DNS is not yet configured). Default login: admin, password: moohoo (be sure to change it immediately).
SPF, DKIM, DMARC setup: the foundation of email deliverability
These three DNS records are critically important for ensuring your email deliverability. They help recipient mail servers verify sender authenticity and prevent spam and phishing. Proper **SPF, DKIM, and DMARC setup** is the gold standard in 2026.
SPF: protecting against sender spoofing
SPF (Sender Policy Framework) is a DNS TXT record that specifies which IP addresses are authorized to send mail on behalf of your domain. If an email arrives from an IP address not listed in the SPF record, it may be flagged as spam or rejected.
Example SPF record:
vashdomen.ru. IN TXT "v=spf1 ip4:ВАШ_IP_АДРЕС_VPS include:_spf.mailcow.email ~all"
v=spf1: Indicates the SPF version.ip4:ВАШ_IP_АДРЕС_VPS: Authorizes sending from your VPS IP address.include:_spf.mailcow.email: If Mailcow uses external relays (e.g., for notifications), this part will be relevant. In most cases, for a purely self-hosted server, only your IP is sufficient.~all: Softfail. Recipient servers may accept the email but mark it as suspicious. For a stricter policy, use-all(hardfail).
DKIM: digital signing of emails
DKIM (DomainKeys Identified Mail) is an email authentication method that allows the sender to "sign" their messages with a digital signature. Recipient mail servers use the public key from the DNS record to verify the signature and ensure that the email has not been altered in transit and was indeed sent from an authorized server.
Mailcow generates DKIM keys automatically. You will need to retrieve the public key from the Mailcow web interface (Domains -> Your domain -> DKIM) and add it as a TXT record in your DNS.
Example DKIM record (selector dkim):
dkim._domainkey.vashdomen.ru. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD..."
The p=... part will be your public key.
DMARC: policy for handling unauthorized emails
DMARC (Domain-based Message Authentication, Reporting & Conformance) is a policy that tells recipient mail servers how to handle emails that fail SPF or DKIM checks, and also allows you to receive reports on such emails. DMARC relies on SPF and DKIM.
Example DMARC record:
_dmarc.vashdomen.ru. IN TXT "v=DMARC1; p=quarantine; fo=1; ruf=mailto:[email protected]; rua=mailto:[email protected]"
v=DMARC1: DMARC version.p=quarantine: Policy. Can benone(reports only),quarantine(send to spam),reject(reject entirely). Start withnoneorquarantine.fo=1: Send failure reports if any of the checks (SPF/DKIM) fail.ruf=mailto:[email protected]: Address for forensic reports.rua=mailto:[email protected]: Address for aggregate reports.
Verifying correct settings
After adding all DNS records, allow time for them to propagate (usually a few hours). Then, use online tools to check SPF, DKIM, DMARC, and PTR records. For example, MxToolbox, DMARC Analyzer, Mail-Tester.com. Send a test email to Mail-Tester.com to get a detailed report on your server's configuration and deliverability.
Mail server not delivering emails? Troubleshooting and solutions
If your **mail server is not delivering emails**, or they consistently land in spam, this can be due to numerous reasons. It's important to approach diagnostics systematically.
Warming up a new IP address and domain
- Start with small sending volumes (e.g., 50-100 emails per day) during the first week.
- Gradually increase the volume, but by no more than 10-20% per day.
- Send emails to active, "good" addresses that will open and reply to them.
- Avoid sending to non-existent addresses or addresses that haven't been used for a long time.
- Use Double Opt-In for new subscribers.
- Monitor server logs and DMARC reports to respond promptly to issues.
Blacklisting: how to check and get delisted
One of the most common reasons for deliverability issues is an IP address or domain being added to **blacklists**. Hundreds of such lists exist, but the most influential include Spamhaus, SURBL, UBL, CBL, and others.
How to check:
- Use online services such as MxToolbox Blacklist Check, IPVoid, AbuseIPDB to check your IP address and domain.
- Check your mail server logs. They often indicate the reason for email rejection, including a link to the blacklist.
How to get delisted:
- Address the cause: Before requesting removal, find and fix the reason for being blacklisted. This could be a compromised server, spamming, or incorrect DNS configuration.
- Request delisting: Almost every blacklist has a delisting procedure. Go to their website, enter your IP address, and follow the instructions. Be prepared to provide explanations and proof of remediation.
- Patience: The delisting process can take anywhere from a few hours to several days.
Monitoring reputation and mail server logs
- IP reputation monitoring: Use Google Postmaster Tools (for sending to Gmail), Microsoft SNDS (for Outlook.com/Hotmail), as well as general IP reputation monitoring tools like Talos Intelligence.
- Log analysis: Mail logs (e.g.,
/var/log/mail.logfor Postfix/Dovecot) contain valuable information about email delivery, errors, and rejection reasons.tail -f /var/log/mail.log # View logs in real-time - DMARC reports: Configure the receipt of aggregate DMARC reports (RUA) and use analyzers (e.g., DMARC Analyzer) to interpret them. They will give you an overall understanding of how your emails pass SPF/DKIM checks on different servers.
Maintenance and security for self hosted email 2026
Keeping a mail server up-to-date and secure is an ongoing process. In 2026, threats are becoming increasingly sophisticated, making preventative measures and regular maintenance critically important.
Regular updates and backups
- OS and software updates: Regularly update your operating system and all mail stack components (Mailcow, Docker). This helps close known vulnerabilities and gain new features.
cd /opt/mailcow-dockerized # Go to the Mailcow directory ./update.sh # Update Mailcow - Backups: Set up regular automatic backups of your entire Mailcow configuration and mail data. Store backups on a separate server or in cloud storage. Mailcow has built-in mechanisms for creating backups.
./helper-scripts/backup_and_restore.sh backup # Create Mailcow backup
Anti-spam and antivirus protection
Mailcow comes with pre-installed solutions such as Rspamd (powerful anti-spam) and ClamAV (antivirus). Ensure they are correctly configured and regularly update their databases.
- Rspamd configuration: Consult the Rspamd documentation to fine-tune its rules and weights for your specific workload.
- ClamAV updates: Ensure that the
freshclamdaemon is running and regularly updating virus definitions. - Fail2ban: Mailcow also uses Fail2ban to protect against brute-force attacks on SMTP, IMAP, POP3, and the web interface. Check its logs and ensure it is actively blocking suspicious IP addresses.
In addition to these measures, consider extra layers of security, such as two-factor authentication for accessing the Mailcow web interface and mailboxes, as well as strong password policies for users.
Frequently Asked Questions
Here we've compiled answers to the most common questions about deploying and maintaining your own mail server on a VPS.
How long does it take to set up a self-hosted email server on a VPS?
A basic Mailcow installation on a prepared VPS can take from 30 minutes to 2 hours, including the configuration of essential DNS records. However, a full setup of SPF, DKIM, DMARC, IP address warm-up, and fine-tuning anti-spam measures may require several days or even weeks of active monitoring and adjustments, especially for a new domain.
Can I use a dynamic IP address for a mail server?
It is strongly not recommended to use a dynamic IP address for a mail server. Recipient mail servers require a stable, static IP address with a correctly configured PTR record that does not change. Dynamic IP addresses are often associated with spam and will almost certainly lead to deliverability issues, as their reputation is constantly reset or degraded.
What disk space is needed for a mail server?
Disk space depends on the number of mailboxes and the expected volume of stored emails. For 10-20 mailboxes with moderate traffic, 40-80 GB of NVMe disk space is sufficient. For 50-100 mailboxes, 160-320 GB will be needed. NVMe disks are recommended for better performance, especially with intensive mail database operations.
What should I do if my IP address is already blacklisted?
If your IP address is already blacklisted, first identify the cause (check server logs for spam activity). Resolve the issue, then visit the websites of the relevant blacklists (e.g., Spamhaus, MXToolbox) and follow their instructions to request delisting. You may need to provide proof of vulnerability remediation. The process can take up to 72 hours.
Is an SSL certificate necessary for a mail server?
Yes, an SSL certificate is mandatory for a modern mail server. It ensures encrypted connections between the client and server (IMAP/POP3/SMTP), as well as between mail servers (STARTTLS). Mailcow automatically integrates with Let's Encrypt to obtain and renew free SSL certificates, which significantly simplifies this task and enhances the security of your communications.
Conclusion
Deploying your own mail server on a VPS in 2026 is an ambitious but entirely realistic project that offers complete control and high flexibility. Key success factors include carefully choosing a VPS provider that allows port 25 and provides a clean IP with PTR configuration capabilities, as well as flawless SPF, DKIM, and DMARC setup. Remember that deliverability is not just about technical configuration, but also continuous reputation monitoring, IP address warm-up, and prompt response to blacklisting issues, all of which require a systematic approach and significant time investment.
NVMe VPS with 60-second activation: full root access, 20+ locations, pay with card or crypto.
Choose a plan