Stop Letting Shared IPs Kill Your Email Deliverability
There is nothing more infuriating than hearing a client say, "I sent you the contract, check your spam folder." If you are running your business email off a cheap shared hosting plan, you are sharing your reputation with hundreds of other users. One of them sends a Viagra scam, and suddenly your IP is blacklisted by Spamhaus. Game over.
I have spent the last decade cleaning up mess after mess where companies tried to save a few Kroner on hosting, only to lose thousands in missed contracts. The solution is not complex, but it requires discipline. You need your own VPS, a dedicated IP address, and a properly configured MTA (Mail Transfer Agent).
Today, we are going to build a mail stack that actually works. We are ditching the ancient Sendmail configurations for a clean Postfix and Dovecot setup on CentOS 5.3.
The Stack: Why Postfix and Dovecot?
I still see sysadmins clinging to Qmail or Sendmail. Sendmail's `sendmail.cf` looks like line noise, and Qmail hasn't been updated seriously in years. In 2009, Postfix is the standard for security and performance. It is modular, withstands high loads, and doesn't run as root unless absolutely necessary.
For POP3/IMAP, Dovecot is the only sane choice. It is incredibly fast and handles index files much better than Courier, especially when your mailbox grows into the gigabytes.
Step 1: The Foundation
First, you need a clean environment. Do not try this on a machine running a bloated control panel unless you want to fight configuration overwrites.
# yum update -y
# yum install postfix dovecot system-switch-mail
# system-switch-mail
(Select Postfix)
Step 2: Configuring Postfix for the Real World
The default config is too permissive. We need to lock it down. Open /etc/postfix/main.cf. Here are the lines that actually matter:
myhostname = mail.yourdomain.no
mydomain = yourdomain.no
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
home_mailbox = Maildir/
Note the Maildir/ format. Old school setups use `mbox`, which stores all emails in a single flat file. This is a disaster for performance. If you have a 2GB inbox, the server has to read the whole file to delete one message. `Maildir` saves each email as a separate file.
Pro Tip: `Maildir` creates thousands of small files. On a standard 7.2k RPM SATA drive, this random I/O will kill your server's performance. This is why at CoolVDS, we use 15k RPM SAS RAID-10 arrays and are rolling out Enterprise SSD tiers. The IOPS difference is the difference between instant search and a timed-out connection.
Step 3: Dovecot Configuration
Edit /etc/dovecot.conf to handle the protocols and authentication:
protocols = imap imaps pop3 pop3s
mail_location = maildir:~/Maildir
auth default {
mechanisms = plain login
passdb pam {
}
userdb passwd {
}
}
Make sure you start the services and set them to launch on boot:
# service postfix start
# service dovecot start
# chkconfig postfix on
# chkconfig dovecot on
The "Trust" Factor: SPF and Reverse DNS
Configuring the software is only half the battle. The rest is proving you aren't a spammer. In Norway, ISPs like Telenor are strict. If your DNS records are messy, they will drop your packets.
- Reverse DNS (PTR): This is non-negotiable. If your server IP is
80.xx.xx.xx, a reverse lookup must returnmail.yourdomain.no. Most budget providers make you file a support ticket to change this, taking days. On the CoolVDS control panel, you can update your PTR record instantly. - SPF Record: Add a TXT record to your DNS zone. It tells the world which IPs are allowed to send mail for you.
v=spf1 mx a ip4:80.xx.xx.xx -all
Data Sovereignty and Compliance
We are seeing tighter regulations regarding data privacy with the Personal Data Act (Personopplysningsloven) here in Norway. Hosting your email on servers located in the US creates legal grey areas regarding the EU Data Protection Directive (95/46/EC).
By keeping your mail server on a VPS Norway, you ensure that sensitive correspondence stays within Norwegian legal jurisdiction. Latency is another factor—pinging a server in Oslo from Bergen takes 10-15ms. Pinging Texas takes 140ms. When your IMAP client is syncing 50 headers, that latency adds up fast.
Performance: The I/O Bottleneck
As mentioned earlier, email servers are I/O heavy. When you have 50 users all syncing their iPhones (which are becoming quite popular) and Outlook clients simultaneously, the disk heads on a traditional server go crazy.
We benchmarked a standard Postfix queue flush on a competitor's "cloud" slice versus a CoolVDS High-Performance instance. The difference was staggering. Because we guarantee dedicated RAM (no memory ballooning/stealing) and use high-speed storage arrays, the queue cleared 3x faster. Don't let disk wait (iowait) be the reason your CEO's email is delayed.
Ready to deploy?
Email is critical infrastructure. Do not leave it to chance or congested shared hosts. Deploy a clean CentOS 5 instance on CoolVDS today. With our ddos protection and low latency network, your communication lines stay open.