Skip to content

chrean/dovecot-formula

 
 

Repository files navigation

dovecot-formula

A salt formula that installs and configures the dovecot IMAP server. It currently supports an Arch, Debian/Ubuntu, Gentoo or Red Hat styled layout of the dovecot configuration files in /etc. Config file content (where needed) is stored in pillar (see pillar.example).

Disclaimer

This is just a fork of the official, unmaintained, Dovecot Formula for Salt. Use it at your own risk, as it's been heavily and hastily customized for my specific use cases.

Config file to pillar mappings:

/etc/dovecot/local.conf in dovecot:config:local

e.g.:

/etc/dovecot/dovecot-sql.conf.ext in dovecot:config:dovecotext:sql
/etc/dovecot/dovecot-ldap.conf.ext in dovecot:config:dovecotext:ldap
/etc/dovecot/conf.d/auth-ldap.conf.ext in dovecot:config:confext:ldap
/etc/dovecot/conf.d/10-ldap.conf in dovecot:config:conf:10-ldap
/etc/dovecot/auth.d/example.tld.passwd in dovecot:config:passwd_files:example.tld

Note

Any help, suggestions if this works / how this works for other distributions are welcome.

Available states

dovecot

Installs and configures the dovecot package, and ensures that the associated dovecot service is running.

Minion configuration

Unfortunately, automating the provisioning of some delicate settings is not possible, or anyway not ideal in my opinion. E.g., the login_trusted_networks setting for Dovecot is difficult to safely fetch from the minion; therefore, the best solution I could think of for now is adding a section to the pillar, like this:

postfix:
  mynetworks:
    - 172.16.1.0/24
    - 192.168.0.0/24

The list of networks will then be expanded, joined, and injected into Dovecot's conf files appropriately.

Also, there are other grains related to the DB if you decide to use it:

postfix:
  db:
    host: hostname.example.com
    name: postfixadmin
    user: postfixadmin
    password: verysecret

Releases

No releases published

Packages

No packages published

Languages

  • SaltStack 93.2%
  • Dockerfile 6.8%