Configure VPS or dedicated server as a mail server allows you to send and receive email directly from your own infrastructure. This provides full control over email delivery, security policies, sending limits, and performance.
This type of setup is typically used by businesses that require custom mail configurations, larger outbound email volumes, application-based email sending, or complete ownership of their email environment.
Because mail servers are closely monitored by spam filters, blacklist operators, and receiving mail providers, correct configuration is essential. Even minor misconfigurations can result in email delivery failures. This guide outlines the key steps required to configure a VPS or dedicated server as a mail server using the Domains.co.za services.
TABLE OF CONTENTS
Important Note Before You Configure VPS
Running your own mail server requires technical expertise and ongoing maintenance.
Before proceeding, ensure that:
- Your VPS or dedicated server has a static public IP address.
- Reverse DNS (PTR records) can be configured for that IP.
- Port 25 is open, or alternative SMTP ports (such as 587 or 465) are available.
- You are familiar with basic Linux server administration.
- You understand email authentication concepts like SPF, DKIM, and DMARC.
Misconfigured mail servers are one of the most common causes of email blacklisting.

Step 1: Access Your VPS or Dedicated Server
1. Login to your Domains.co.za account.
2. From the dashboard, open the Manage Services menu.
3. Select the hosting package linked to the domain you want to use for email.
4. Click Manage, then access your server control panel or obtain your SSH credentials.
All mail server configurations will be performed directly on the server.
Step 2: Set a Fully Qualified Domain Name (FQDN)
Your mail server must have a valid and resolvable hostname.
A common example is:
mail.yourdomain.com
To configure this:
- Set the hostname on your server (Linux system hostname configuration).
- Create a DNS A record pointing mail.yourdomain.com to your server’s IP address.
- Confirm the hostname resolves correctly using DNS lookup tools.
The hostname is used by receiving mail servers to verify your server’s identity.
Step 3: Configure Reverse DNS (PTR Record)
Reverse DNS is critical for successful email delivery.
1. Login to your Domains.co.za client area.
2. Locate your VPS or dedicated server IP settings.
3. Set the PTR record to match your mail server hostname:
mail.yourdomain.com
IMPORTANT:
Many email providers will reject or heavily filter messages if reverse DNS is missing or does not match the server hostname.
Step 4: Install & Configure Mail Server Software
To send and receive email, you must install the mail server components.
Common Mail Server Software
Outgoing mail (SMTP):
- Postfix.
- Exim.
- Sendmail.
Incoming mail (IMAP/POP3):
- Dovecot.
- Courier.
Basic Configuration Tasks
- Define your mail domains.
- Create mailboxes or virtual users.
- Enable SMTP authentication.
- Set message size limits.
- Enable SSL/TLS encryption for all mail services.
- Restrict relaying to authenticated users only.
Proper authentication is essential to prevent your server from being used to send spam.
Step 5: Configure DNS Records for Email Authentication
Email authentication significantly improves deliverability and trust.
SPF (Sender Policy Framework)
Authorise your server’s IP address to send email:
v=spf1 ip4:YOUR.SERVER.IP ~all
This tells receiving servers that your VPS or dedicated server is permitted to send email for your domain.
DKIM (DomainKeys Identified Mail)
- Generate DKIM keys on your mail server.
- Add the public key as a TXT record in your domain’s DNS.
- Enable DKIM signing in your mail server configuration.
DKIM ensures messages have not been altered in transit.
DMARC (Domain-based Message Authentication)
Define how receiving servers should handle unauthenticated email:
v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com
DMARC provides reporting and enforcement options and helps protect your domain from spoofing.
Step 6: Secure Your Mail Server
Mail servers are frequent targets for abuse. Strong security is essential.
Recommended security measures include:
- Enabling SSL/TLS for SMTP, IMAP, and POP3.
- Requiring SMTP authentication for outgoing mail.
- Installing spam filtering and virus scanning tools.
- Limiting outbound mail rates per user or IP.
- Restricting open relays.
- Keeping the operating system and mail software updated.
Failure to secure your server can result in blacklisting or account suspension.
Step 7: Test Sending & Receiving Email
Once configuration is complete:
- Send test emails to major providers (Gmail, Outlook, Yahoo).
- Inspect message headers to confirm SPF, DKIM, and DMARC pass.
- Test incoming mail delivery.
- Monitor mail logs for errors, delays, or rejected messages.
Testing ensures that your server is correctly authenticated and trusted.
Additional Information
Why Reverse DNS and Hostname Matching Matter
- The server hostname must match the PTR record.
- Mismatched or missing reverse DNS is one of the most common causes of rejected email.
- Many providers automatically flag servers without a valid reverse DNS.
- Correct hostname and PTR configuration are non-negotiable for reliable delivery.
Email Deliverability Best Practices
- Gradually warm up new IP addresses by sending small volumes initially.
- Avoid sending unsolicited or bulk email.
- Maintain consistent sending patterns.
- Monitor public blacklist databases regularly.
- Review mail logs and DMARC reports frequently.
- Good sending behaviour is just as important as technical configuration.
Ongoing Maintenance Considerations
Running your own mail server requires continuous attention:
- Apply regular software updates and security patches.
- Monitor logs and delivery performance.
- Respond quickly to blacklist listings.
- Review authentication records periodically.
- Poor maintenance can lead to deliverability issues or service suspension.
When to Use Domains.co.za Email Instead
Running your own mail server is not suitable for every business.
Domains.co.za email services may be a better option if you prefer:
- Fully managed security and spam filtering.
- Built-in redundancy and backups.
- Higher deliverability without server administration.
- Less risk of blacklisting due to misconfiguration.
- For many businesses, the Domains.co.za email provides reliability without operational overhead.
Login to Domains.co.za Account
1. Go to the Domains.co.za website Account Login page.

2. Enter your Email and Password and click the Sign In button.
3. You will see the Domains.co.za Dashboard, displaying the Manage Account menu on the left and your Account Information, Account Overview and Open Support Tickets on the right.




