How to Configure Postfix and Dovecot on Plesk Onyx 12 on CentOS 8

How to Configure Postfix and Dovecot on Plesk Onyx 12 on CentOS 8

What Do I Need?

  • A Dedicated or VPS Linux Server
  • CentOS
  • Putty

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.

  1. Pre-Flight Checks
  1. Log into your Plesk Onyx control panel as a root user or user with escalated privileges.
  2. Go to ‘Tools & Settings’ > ‘Mail Server Settings’, in the ‘Mail’ sub-group.

  1. 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.
  1. Install Postfix and Dovecot
  1. 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:

https://svr.example.com:8443/admin/update/add-components

  1. Click the ‘+’ beside ‘Mail hosting’.

  1. If you’ve not got Postfix or Dovecot installed, select them here and then click ‘Continue’.
  2. 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.
  3. I’d recommend then returning to ‘Tools & Settings’ and selecting ‘Restart Server’.

  1. Check your Installation
  1. When your web server has rebooted return to ‘Tools & Settings’ > ‘Mail Server Settings’, in the ‘Mail’ sub-group.
  2. 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

  1. Enable antivirus:

Used antivirus = Plesk Premium Antivirus

  1. Enable dmarc:

Enable DMARC to check incoming mail = Tick

  1. Enable dkim:

Allow signing outgoing mail = Tick

  1. 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 abuse@example.com

  1. Enable DNS based spam protection:

DNS zones for DNSBL service = zen.spamhaus.org

Next Steps

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:

https://svr.example.com:8443/admin/mail-settings/queue?serviceNodeId=1

Conclusion

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.

How To Set up a VSFTPD Server on a CentOS 7 VPS or Dedicated Server

Brief Description FTP is usually insecure exposing clear-text passwords, userna
2 min read
Avi Ilinsky
Avi Ilinsky
Hosting Expert

How To Set up a VSFTPD Server on an Ubuntu 16.04 VPS or Dedicated Server

Brief Description FTP data is usually insecure since information (usernames, pa
2 min read
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert

How to use phpMyAdmin to develop a website (without MySQL experience)

Brief description A web developer who is not well versed into coding websites f
2 min read
Idan Cohen
Idan Cohen
Marketing Expert

How to Install MySQL on a Windows Web Server Running Apache

This tutorial will show you how to install the MySQL database on a Windows serve
3 min read
Michael Levanduski
Michael Levanduski
Expert Hosting Writer & Tester
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top