What Do I Need?
- A Dedicated or VPS Linux Server
What Are Postfix and Dovecot?
Postfix originally started life as a mail server created by Wietse Venema, at IBM Research. It was developed and used as an alternative to the widely-used Sendmail program. It’s actively updated and maintained by Google and its creator. Postfix is open-source and is essentially a mail transfer agent or MTA, that routes and delivers emails. Dovecot is an open-source IMAP and pop3 email server designed with security at the forefront. It’s an awesome choice for both large and small deployment as it’s fast and simple to set up and doesn’t really require much administration if any and it’s not resource-hungry.
- Pre-Flight Checks
- Log into your Plesk Onyx control panel as a root user or user with escalated privileges.
- Go to ‘Tools & Settings’ > ‘Mail Server Settings’, in the ‘Mail’ sub-group.
- If your screen is looking similar to mine, then all good, because basically, you’re already done. However, if it’s not or displays something different we’re going to have to install it onto the webserver.
- Install Postfix and Dovecot
- Click the hyperlinked text beside ‘Installed mail server’. And just in case the link isn’t showing, the link below is what you should head to if it’s missing:
- Click the ‘+’ beside ‘Mail hosting’.
- If you’ve not got Postfix or Dovecot installed, select them here and then click ‘Continue’.
- You’ll see a dialog that shows the real-time installation of your newly selected options. Once it’s finished, it’ll end with a confirmation summary. This is where you’ll first identify if there have been any installation or misconfiguration issues.
- I’d recommend then returning to ‘Tools & Settings’ and selecting ‘Restart Server’.
- Check your Installation
- When your web server has rebooted return to ‘Tools & Settings’ > ‘Mail Server Settings’, in the ‘Mail’ sub-group.
- Enable ‘Turn on limitations on outgoing mail messages’. Feel free to use the following settings I’m personally recommending for running a mail server that doesn’t bow or break to spam:
Default limit on outgoing messages from a mailbox (per hour) = 30
Default limit on outgoing messages from a domain (per hour) = 60
Default limit on outgoing messages from a subscription (per hour) = 80
- Enable antivirus:
Used antivirus = Plesk Premium Antivirus
- Enable dmarc:
Enable DMARC to check incoming mail = Tick
- Enable dkim:
Allow signing outgoing mail = Tick
- Enable spam protection:
Enable SPF spam protection to check incoming mail = Tick
SPF checking mode = Reject mail when SPF resolves to “fail” (deny)
SPF local rules = include:spf.trusted-forwarder.org
SPF guess rules = a/24 mx/24 ptr
SPF explanation text = Your message was identified as Spam. If this is wrong please contact us at firstname.lastname@example.org
- Enable DNS based spam protection:
DNS zones for DNSBL service = zen.spamhaus.org
Next, I’d firmly recommend checking out the other resources that your control panel has to offer in managing your incoming and outgoing mail services efficiently. Especially as you’ll almost always be fighting a near constant battle against the onslaught of spam that a lot of servers get hit with for various reasons. If mail is getting stuck, check your mail queues visually via:
Watch your mail servers and services closely. Spam directed at your clients and your own servers can be a serious problem. Once your server or IP address ranges are identified as sources of spam it becomes very, very hard to clean their online reputation again. So it’s best to work preventatively and ensure that you maintain a clean badge of honor with Spamhaus and others.
- Do you need the best VPS? Read about our different offers.