Debian exim/dovecot email server with Saltstack – Introduction

I’ve needed to update my email server for a while. This time I wanted to do the installation with Saltstack:

  • Saltstack is fun
  • It means I have an easy-to-read document about what is on the server and how it is installed.

Tools like Saltstack are not just for when you’ve got lots of servers. Having a simple set of files that show exactly what has been changed from default and why is invaluable.

Ok – there are a few parts to this system.

  • exim4 handles the SMTP part – incoming and outgoing email;
  • SpamAssassin will do the SPAM filtering;
  • dovecot will handle reading email via IMAP

Plus we need various security bits and pieces, user accounts and so on.

I’ll be running SaltStack in masterless mode – there isn’t any point in running a dedicated Salt Master server.


Salt starts at top.sls which looks like this:

# Top file for putting an email server together
# Will be used from Masterless mode so always trigger everything
    - saltmasterless
    - ntp
    - exim
    - spam-assassin
    - dovecot
    - users
    - fail2ban
    - logcheck
    - backup

This will pull in the .sls files containing all the details for each component.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.