Should you run your own email server on a VPS?
Usually not. A mail server on a VPS is more work than it looks: you publish SPF, DKIM, DMARC and reverse DNS, build a new IP's reputation, renew TLS certificates, keep backups and watch blacklists yourself. For mailboxes on your domain, most businesses are better off with the email included with web hosting. Your own server fits when you need full control and have someone to run it.
A RapidServer VPS can run one within our Acceptable Use Policy, which forbids unsolicited bulk email: the server is for your own mail, never cold campaigns.
cPanel mail vs own mail server
| cPanel mail on web hosting | Your own mail server on a VPS | |
|---|---|---|
| Who runs it | We do, in the same cPanel account as your website | You do, with full root; managed support can tune the mail stack |
| SPF, DKIM, DMARC, PTR | DKIM and SPF set up for you; cPanel's Email Deliverability tool checks them, along with DMARC | You publish every record and set the PTR yourself |
| Spam filtering | Included | You install and tune it |
| Sending IP | The hosting server's | Your VPS's dedicated IPv4, whose reputation you build |
| Backups | With the account, weekly on Starlight, daily on the other plans | Daily backups kept for 7 days, plus snapshots on demand |
| Price | From ₹49/mo on a 3-year term | From ₹581/mo, plus ₹1,499/mo if you add managed support |
| Best fit | Everyday business mail on your domain | Teams that need full control and have someone to run it |
Prices are per month, plus 18% GST.
When a VPS for email makes sense
A VPS is a cloud server for email that you control end to end. It suits:
- Full control. You choose the software, spam rules, mailbox sizes and how long mail is kept.
- Mail from your own apps. Order confirmations, password resets and alerts sent from a dedicated IP whose PTR record matches your mail hostname.
- Several of your own domains on one server, limited by disk rather than a plan's mailbox count.
- A team that can run it: someone at home with Linux over SSH, or managed support.
Only need info@ and a mailbox per person, or calendars with mail? Email with web hosting or a separate service is the better choice.
Your own mail server in India on our VPS
What our VPS hosting gives a mail server:
- Port 25, open after a short verification on new accounts.
- Reverse DNS: custom PTR records from the control panel, alongside network firewall rules.
- A dedicated IPv4 and an IPv6 /64, in Mumbai (BOM1) or Delhi NCR (DEL1).
- Optional managed support at ₹1,499/mo: security patching, hardening, web, database and mail stack tuning, and service monitoring. Tuning covers the mail software, not what runs on it.
Our Acceptable Use Policy bans unsolicited bulk email (UBE) and unsolicited commercial email (UCE), and opt-in mailing lists must be verified. Breaking it can lead to suspension or termination.
SPF, DKIM, DMARC and reverse DNS
Receiving servers check who you are before accepting mail. Pick a hostname such as mail.example.com and publish these records at your DNS host (see DNS kya hai):
- MX says where your domain's mail is delivered; an A record points the mail hostname to the VPS.
- SPF lists the servers allowed to send for your domain. Keep one SPF record, and add any other server that sends for you, such as your website's.
- DKIM signs each message: your mail stack makes the key pair and you publish the public key.
- DMARC tells receivers what to do when checks fail and where to send reports. Start at
p=none, then move toquarantineorrejectonce your real mail passes.
example.com. MX 10 mail.example.com. mail.example.com. A 203.0.113.10 example.com. TXT "v=spf1 mx -all" mail._domainkey.example.com. TXT "v=DKIM1; k=rsa; p=your-public-key" _dmarc.example.com. TXT "v=DMARC1; p=none; rua=mailto:dmarc@example.com"
Reverse DNS turns your IP back into a name. Set the PTR to mail.example.com in our control panel, so the IP and the hostname point at each other.
IPv6 counts too. Your VPS also has an IPv6 /64, and Postfix uses IPv6 by default on a server that has it, so mail to providers such as Gmail can leave from the IPv6 address. Google requires a PTR record for the sending address, IPv6 included. Either give mail.example.com an AAAA record and an IPv6 PTR as well, or keep Postfix on IPv4 with inet_protocols = ipv4 in main.cf and restart Postfix.
A new IP's reputation and blacklists
Mailbox providers judge mail partly by the sending IP's history, and a new server has little, so correct records alone don't guarantee the inbox. Before launch, look up the new IPv4 on public blocklists; if it is listed, follow that list's removal process. Start with mail people expect, such as replies and transactional messages, and let volume grow gradually. Never buy lists or send cold email.
After launch, check blocklists on a schedule and read DMARC reports. A sudden listing can mean a hacked mailbox or a form sending spam, so fix the cause first.
TLS and mail ports
Install a certificate for your mail hostname (see SSL certificate kya hai) and use it for SMTP and IMAP. Port 25 carries server-to-server mail with STARTTLS, 587 or 465 carry your users' outgoing mail after login, and 993 is IMAP over TLS. Open only the ports you use, in ufw and the client-area firewall rules (see our firewall guide), then check DNS and TLS from the VPS or another server:
dig +short MX example.com dig +short TXT _dmarc.example.com dig +short -x 203.0.113.10 openssl s_client -connect mail.example.com:25 -starttls smtp -servername mail.example.com
The reverse lookup should return mail.example.com., and the TLS test should show a valid certificate for that name.
Ready-made open-source mail stacks
Two well-known open-source routes:
- Postfix and Dovecot. Postfix sends and receives mail over SMTP; Dovecot serves mailboxes over IMAP and POP3. You add spam filtering, DKIM signing and webmail yourself: the flexible route.
- A Mail-in-a-Box style bundle. Mail-in-a-Box installs Postfix, Dovecot, spam filtering, webmail and a control panel together, gets TLS certificates, and can run your domain's DNS with SPF, DKIM and DMARC set. Its guide asks for a fresh Ubuntu 22.04 x64 server dedicated to the box; Ubuntu 22.04 LTS is one of our images.
The high-level order is the same either way:
- Deploy the VPS, pass the port 25 check on a new account, and set matching A and PTR records.
- Install the stack by its official guide and open the mail ports.
- Publish MX, SPF, DKIM and DMARC, and install the TLS certificate.
- Send test mail to addresses you own elsewhere and check the headers show SPF, DKIM and DMARC passing.
Backups and monitoring
Every VPS includes daily backups kept for 7 days, plus snapshots on demand; take one before upgrading the mail stack. A daily backup misses mail that arrived after it ran, so also copy mailboxes off the server (see our VPS backup guide). Then watch what breaks mail quietly: free disk space, the mail queue, certificate renewal and blocklist status. Managed support includes service monitoring with on-call response.
Which plan and city for a mail server
For a small team, start on Stardust: 2 dedicated vCPU, 4 GB RAM and 20 GB NVMe for ₹581/mo plus 18% GST. Mailboxes grow, so watch the disk; upgrades are prorated to the day. Pick Mumbai (BOM1) or Delhi NCR (DEL1) at the same price (see our data centers). Your VPS is ready a few minutes after payment, and our 24/7 support team can help.
Port 25 after a short verification, custom reverse DNS from the control panel and a dedicated IPv4 in Mumbai or Delhi NCR, ready a few minutes after payment, from ₹581/mo.
See VPS plans