How to Setup a Professional Zimbra Mail Server: Best practice SPF and DKIM

Setting Up a Mail Server is more difficult than it seems, it is also quite expensive. Furthermore because there is so much Spam there are measures an email administrator should take to ensure spam-free email delivery

In this tutorial I am using Zimbra 8.0.7 as the Email Server (MTA). Zimbra includes all the features you would expect of a modern day email server and as I see it is the only viable competition to Google Business Email and Microsoft Exchange. It is open source and that is why we love it.

For the basic instructions of setting up the Email Server Please refer to this article on DigitalOcean about how to install a zimbra mail server.

Keep in mind:

Although Zimbra is comprehensive and the above tutorial explains in detail, there is a few more things we need to do to ensure that our mail is of high quality and professional.

professional mail server zimbra setup

Be safe with Email Accounts

Spammers are always looking for vulnerable email servers to make there emails less spammy. However once they have control your mail server will inevitably be blacklisted.

  • Make sure your passwords created on email accounts have a high level of difficulty (I would recommend setting passwords for your clients)
  • Only give passwords over phone, not in plain text

Checking your Email Health

A great resource to check your email server health is to use:

DNS SPF Record Setup

An SPF record is short for: Sender Policy Framework (SPF) is an email validation system designed to prevent email spam by detecting email spoofing, a common vulnerability, by verifying sender IP addresses.

1. You can use SPF Wizard to formulate your SPF Record

2. Typically: “v=spf1 mx a ~all” is what the DNS record should contain

3. For more detailed information about SPF Records check digitalocean

DKIM Record Setup

DKIM is slighly different from SPF records and are sometimes optional, however for a professional server I would recommend it. DomainKeys Identified Mail (DKIM) is a method for associating a domain name to an email message, thereby allowing a person, role, or organization to claim some responsibility for the message

1. Login to your zimbra server

2. su zimbra -
3. /opt/zimbra/libexec/zmdkimkeyutil -a -d

4. Zimbra will output the DNS record you should enter into your DNS settings

Example: 0E9F184A-9577-11E1-AD0E-2A2FBBAC6BCB._domainkey IN TXT "v=DKIM1;=rsa;
 /6LYWYU1whOQ9oKZVAwWHSovAWZpByqNMZmFg7QIDAQAB" ; ----- DKIM 0E9F184A-9577-11E1-AD0E-2A2FBBAC6BCB for

For more information check the Zimbra DKIM documentaiton

Other Considerations for a professional Zimbra Mail Server Setup

  • Do not send email with broken links
  • Make sure you are not blacklisted
  • Images should have an alt tag
  • Content should be safe
  • Stay clear of short url’s