Have you ever wished you could send emails from an address like yourname@yourcompany.pk instead of using @gmail.com or @outlook.com?
Having a custom email address looks professional, builds trust, and gives your business its own identity. While setting up your own mail server may sound technical or intimidating, the truth is—you can do it yourself with the right guidance and a reliable VPS in Pakistan.
In this beginner-friendly guide, I’ll walk you through how to set up an Ubuntu mail server step by step, using simple language and real-world explanations. No advanced Linux knowledge required.
Who Are We? (And Why You Can Trust This Guide)
This guide is brought to you by CreativeON, one of the most trusted VPS hosting providers in Pakistan, with over 20 years of experience in the hosting industry.
We support and host platforms for well-known organizations such as City42, Daewoo Pakistan, and Chughtai Lab. We’re also official Google Workspace partners and PKNIC partners, which means we can help you with domains, VPS hosting, and business email—all under one roof.
Our goal isn’t just to sell servers. It’s to help people understand technology in simple, practical terms.

What Is a Mail Server? (In Simple Words)
Think of a mail server as a digital post office.
- When you send an email, it first goes to your mail server
- The server figures out where the email should go
- Then it delivers the message to the recipient’s mail server
To run this post office, you need a place on the internet that’s always available. That’s where a VPS server in Pakistan comes in.
A VPS (Virtual Private Server) is like renting your own private room in a large building. You have control, privacy, and the freedom to install the software you need—such as a mail server.
What You Need Before You Start
Before setting anything up, make sure you have the following:
- VPS hosting in Pakistan (Ubuntu 22.04 is highly recommended)
- A domain name (for example, yourcompany.pk)
- Basic comfort using a terminal (no expert skills required)
- A little patience—you’ll do great 👍
💡 CreativeON is a PKNIC partner, so we can help you register and manage your .pk domain easily.
Step 1: Prepare Your Ubuntu VPS
First, log in to your VPS using SSH. This allows you to control your server remotely.
Once logged in, update your system to ensure everything is secure and up to date:
sudo apt update && sudo apt upgrade -y
This step is important because outdated packages can cause security or compatibility issues later.
Step 2: Install Postfix (The Mail Sender)
Postfix is the software responsible for sending emails from your server.
Install it using:
sudo apt install postfix -y
During installation:
- Choose Internet Site
- Set the System Mail Name to your domain (for example, example.com)
Postfix will now handle all outgoing emails from your server.
Step 3: Install Dovecot (The Mail Receiver)
If Postfix sends emails, Dovecot stores and delivers incoming emails to users’ inboxes.
Install it with:
sudo apt install dovecot-imapd dovecot-pop3d -y
This allows you to:
- Check email on your phone
- Use desktop email clients
- Connect webmail software
Step 4: Install Webmail (Roundcube)
Not everyone wants to use an email app. Roundcube lets you access your email directly from a web browser—just like Gmail.
Install Roundcube:
sudo apt install roundcube -y
During setup, connect it to your database when prompted. Once configured, you’ll have a clean, browser-based email interface for your domain.
Step 5: Set Up DNS Records (Very Important)
This is where many mail servers fail.
To ensure your emails don’t land in spam, you must configure proper DNS records:
- MX record – tells the internet where to deliver your emails
- SPF – proves your server is allowed to send email
- DKIM – digitally signs your emails
- DMARC – tells receiving servers how to handle failed emails
- PTR (Reverse DNS) – links your IP address to your domain
Without these, Gmail, Yahoo, and Outlook may block or spam your emails—even if your server works perfectly.
⚠️ This step is critical for email deliverability and trust.
Step 6: Test Your Mail Server
Send a test email to:
- A Gmail address
- A Yahoo or Outlook address
If the email arrives in the inbox (not spam), congratulations 🎉
You’ve successfully built a working Ubuntu mail server on your VPS.
A Reality Check: Is Self-Hosting Email Always a Good Idea?
Running your own mail server gives you full control, but it also comes with responsibilities:
- Managing spam and blacklists
- Keeping the server secure
- Maintaining deliverability
- Handling updates and monitoring
Many businesses start with self-hosted email for learning or cost reasons—but later switch to managed solutions for reliability.
Should You Use Google Workspace Instead?
If you want Gmail’s power with your own domain, Google Workspace is often the smarter choice.
With Google Workspace, you get:
- Gmail with your business email
- Google Drive, Docs, Meet, and Calendar
- Enterprise-level spam protection
- Zero server maintenance
As an official Google Workspace Partner, CreativeON can offer very competitive pricing in Pakistan, often better than standard retail rates.
Why Buy a VPS in Pakistan from CreativeON?
If you’re looking to buy a VPS in Pakistan, here’s why customers choose us:
- Local support that understands your needs
- Cheap VPS in Pakistan without cutting corners
- Linux & Windows VPS options
- Reliable infrastructure and honest guidance
Whether you want to learn, experiment, or run production workloads—we’re here to help.
Final Summary
Setting up an Ubuntu mail server involves installing:
- Postfix for sending mail
- Dovecot for receiving mail
- Roundcube for webmail access
All of this runs smoothly on a reliable VPS server in Pakistan—but proper DNS configuration and security are essential for success.
If you want full control and a learning experience, self-hosted email is a great option. If you want simplicity and reliability, Google Workspace may be the better fit.
Either way, CreativeON is here to guide you.

The author
Asher Feroze
I’m Asher Feroze, and I’ve been part of CreativeON for several years, working in various roles including Manager Operations, Business Development Manager, and technical support for our web hosting services. Over time, I’ve gained deep insights into both the business and technical sides of the industry. Now, I use that experience to write informative articles for CreativeON, Gworkspace, and gworkspacepartner.pk, helping readers make smart choices when it comes to web hosting and Google Workspace solutions.