{"id":15157542,"url":"https://github.com/markt-de/puppet-dovecot","last_synced_at":"2025-12-11T21:23:11.556Z","repository":{"id":45413684,"uuid":"85501704","full_name":"markt-de/puppet-dovecot","owner":"markt-de","description":"Puppet module to manage dovecot","archived":false,"fork":false,"pushed_at":"2024-07-23T16:05:32.000Z","size":237,"stargazers_count":5,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-10T00:28:09.164Z","etag":null,"topics":["dovecot","puppet"],"latest_commit_sha":null,"homepage":"https://forge.puppet.com/markt/dovecot","language":"Puppet","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markt-de.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-19T19:13:21.000Z","updated_at":"2024-07-23T16:05:37.000Z","dependencies_parsed_at":"2024-01-16T20:56:55.095Z","dependency_job_id":"572680b5-1f76-49e8-ade0-0cabfc62e292","html_url":"https://github.com/markt-de/puppet-dovecot","commit_stats":null,"previous_names":["oxc/puppet-dovecot"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markt-de%2Fpuppet-dovecot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markt-de%2Fpuppet-dovecot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markt-de%2Fpuppet-dovecot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markt-de%2Fpuppet-dovecot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markt-de","download_url":"https://codeload.github.com/markt-de/puppet-dovecot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219868597,"owners_count":16555871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dovecot","puppet"],"created_at":"2024-09-26T20:00:57.721Z","updated_at":"2025-10-24T14:30:36.919Z","avatar_url":"https://github.com/markt-de.png","language":"Puppet","funding_links":[],"categories":[],"sub_categories":[],"readme":"# puppet-dovecot\n\n[![Build Status](https://github.com/markt-de/puppet-dovecot/actions/workflows/ci.yaml/badge.svg)](https://github.com/markt-de/puppet-dovecot/actions/workflows/ci.yaml)\n[![Puppet Forge](https://img.shields.io/puppetforge/v/markt/dovecot.svg)](https://forge.puppetlabs.com/markt/dovecot)\n[![Puppet Forge](https://img.shields.io/puppetforge/dt/markt/dovecot.svg)](https://forge.puppetlabs.com/markt/dovecot)\n\n#### Table of Contents\n\n1. [Description](#description)\n1. [Usage](#usage)\n    * [What this module affects](#what-this-module-affects)\n    * [Configuration options](#configuration-options)\n    * [External config files](#external-config-files)\n    * [Poolmon configuration](#poolmon-configuration)\n1. [Reference](#reference)\n1. [Development](#development)\n    - [Contributing](#contributing)\n\n## Description\n\nThis module installs and manages the dovecot imap server and its plugins, and provides\nresources and functions to configure the dovecot system.\nIt does, however, not configure any of those systems beyond the upstream defaults.\n\nThis module is intended to work with Puppet 5 and 6, tested dovceot and OS versions are\nlisted below. Patches to support other setups are welcome.\n\n## Usage\n\n### What this module affects\n\nBy default, this module...\n\n* installs the dovecot package\n* recursively purges all dovecot config files\n\n### Configuration options\n\nWhile on a puppet-managed host, splitting the config into multiple conf.d files provides\nnot much advantage, this module supports managing both the dovecot.conf file and several\nconf.d files.\n\nThe dovecot class takes two parameters, $config for dovecot.conf entries and $configs for\nconf.d file entries:\n\n```puppet\nclass { 'dovecot':\n  plugins =\u003e ['imap', 'lmtp'],\n  config =\u003e {\n    protocols =\u003e 'imap lmtp',\n    listen    =\u003e '*, ::',\n  },\n  configs =\u003e {\n    '10-auth' =\u003e {\n      passdb =\u003e {\n        driver =\u003e 'passwd-file',\n        args   =\u003e 'username_format=%u /etc/dovecot/virtual_accounts_passwd',\n      },\n    },\n    '10-logging' =\u003e {\n      log_path =\u003e 'syslog',\n    },\n  }\n}\n```\n\nThis can be conveniently used from hiera:\n\n```yaml\ndovecot::plugins:\n  - imap\n  - lmtp\n  - sieve\ndovecot::config:\n  protocols: imap sieve lmtp\n  hostname: \"%{::fqdn}\"\ndovecot::configs:\n  '10-auth':\n    disable_plaintext_auth: yes\n    passdb:\n      driver: passwd-file\n      args: scheme=CRYPT username_format=%u /etc/dovecot/virtual_accounts_passwd\n  '10-master':\n    default_process_limit: 200\n    default_client_limit: 2000\n    service lmtp:\n      unix_listener /var/spool/postfix/private/dovecot-lmtp:\n        user: postfix\n        group: postfix\n        mode: '0600'\n  '10-ssl':\n    ssl: yes\n    ssl_cert: '\u003c/etc/dovecot/ssl/dovecot.crt'\n    ssl_key: '\u003c/etc/dovecot/ssl/dovecot.key'\n```\n\nFor advanced use-cases you can also use the provided `dovecot::create_config_resources` and\n`dovecot::create_config_file_resources` functions, that are used to handle the $config and\n$configs parameters.\n\nIf you want to use the dovecot::config resource directly, the easiest way is to put both the\nfile (optional) and the hierachical config key into the resource title:\n\n```puppet\ndovecot::config {\n  'protocols': value =\u003e 'imap lmtp';\n  'listen':\n     value =\u003e '*, ::',\n     comment =\u003e 'Listen on all interfaces',\n  ;\n  '10-auth:passdb.driver': value =\u003e 'passwd-file';\n  '10-auth:passdb.args': value =\u003e 'username_format=%u /etc/dovecot/virtual_accounts_passwd'\n}\n```\n\nBut you can also specify them separately:\n\n```puppet\ndovecot::config { 'dovecot passdb driver':\n  file     =\u003e '10-auth',\n  sections =\u003e ['passdb'],\n  key      =\u003e 'driver',\n  value    =\u003e 'passwd-file',\n}\n```\n\nBy default all regular config files are created with mode 0644, but this can be changed by\ncreating the `dovecot::configfile` instance manually and specifying the `$mode` param, or\nby setting the global `dovecot::configs_mode` parameter/hiera key.\n\n### External config files\n\nIn some cases, dovecot requires an external config file to be passed as a config value. This\nis especially the case for SQL- and LDAP-based userdbs.\n\nThese external config files are using a similar syntax, but are parsed by a different parser\n(and at a different point of time), as [explained in the Dovecot wiki](https://wiki.dovecot.org/ConfigFile#External_config_files).\n\nThis module supports such external config files using the `dovecot::extconfigfile` type, or\nthe `dovecot::extconfigs` parameter/hiera key:\n\n```yaml\ndovecot::configs:\n  '10-auth':\n    passdb:\n      driver: sql\n      args: /etc/dovecot/dovecot-sql.conf.ext\ndovecot::extconfigs:\n  'dovecot-sql.conf.ext':\n     driver: pgsql\n     connect: host=sql.example.com dbname=virtual user=virtual password=blarg\n     default_pass_scheme: SHA256-CRYPT\n     password_query: \"SELECT email as user, password FROM virtual_users WHERE email='%u';\"\n```\n\nSince external config files often contain sensitive information like database passwords, they\nare set to mode 0600 by default. This can be changed using the type's `$mode` parameter, or\nthe global `dovecot::extconfigs_mode` parameter/hiera key.\n\nIf you need to specify additional content in the file, like dict maps, you can use the \nextended notation that takes an `entries` and an `additional_content` key:\n\n```yaml\ndovecot::extconfigs:\n  'dovecot-dict-sql.conf.ext':\n    entries:\n      connect: host=localhost dbname=mails user=sqluser password=sqlpass\n    additional_content: |+\n      map {\n        pattern = shared/shared-boxes/user/$to/$from\n        table = user_shares\n        value_field = dummy\n\n        fields {\n          from_user = $from\n          to_user = $to\n        }\n      }\n```\n\n*NOTE*: These external config files are usually stored in `/etc/dovecot`. Unfortunately,\nthe example-config delivered with Dovecot also contains `.conf.ext` files in `conf.d/`, which\nare !included from `10-auth.conf`. Please note that these are *not* external config files as\nexplained here, they are included and parsed by the normal config parser. The example config\nsplits them out to provide multiple options the user can easily choose one from. In a\npuppet-based setup, this should not be necessary, and is thus currently not supported by this\nmodule. Please provide a valid use-case as a bug report, if you have one.\n\n### Poolmon configuration\n\nFor multi-server setups it is possible to enable built-in support for Poolmon:\n\n```yaml\ndovecot::poolmon_manage: true\ndovecot::poolmon_version: '0.6'\n\ndovecot::poolmon_config:\n  scan_interval: 30\n  check_timeout: 5\n  log_debug: false\n  logfile: 'syslog'\n  check_port:\n    - 110\n    - 143\n  check_ssl:\n    - 993\n  socket: '/var/run/dovecot/director-admin'\n  lockfile: '/var/run/poolmon.pid'\n```\n\n*NOTE*: `$dovecot::poolmon_config` uses \"hash\" merge behavior during lookup\n(see [Merge behavior](#merge-behavior) below).\n\n## Reference\n\nClasses and parameters are documented in [REFERENCE.md](REFERENCE.md).\n\n### Merge behavior\n\nAlthough this module defaults to \"deep\" merge behavior for lookups, there's one notable exception.\nThe poolmon configuration `$dovecot::poolmon_config` utilizes the \"hash\" merge behavior. This way\nit is possible to replace default values when necessary, i.e. the `check_port` item.\n\n## Development\n\n### Contributing\n\nPlease use the GitHub issues functionality to report any bugs or requests for new features. Feel free to fork and submit pull requests for potential contributions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkt-de%2Fpuppet-dovecot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkt-de%2Fpuppet-dovecot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkt-de%2Fpuppet-dovecot/lists"}