{"id":15517560,"url":"https://github.com/bodgit/puppet-postfix","last_synced_at":"2025-10-31T07:38:15.433Z","repository":{"id":8462583,"uuid":"58494942","full_name":"bodgit/puppet-postfix","owner":"bodgit","description":"Puppet Module for managing Postfix","archived":false,"fork":false,"pushed_at":"2024-06-25T00:51:45.000Z","size":463,"stargazers_count":0,"open_issues_count":6,"forks_count":12,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-28T16:38:06.572Z","etag":null,"topics":["postfix","puppet"],"latest_commit_sha":null,"homepage":"https://forge.puppet.com/bodgit/postfix","language":"Puppet","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bodgit.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":"2016-05-10T21:33:10.000Z","updated_at":"2021-12-16T21:14:03.000Z","dependencies_parsed_at":"2024-11-01T09:03:09.339Z","dependency_job_id":"c5da4c07-9ad8-45fa-aaf7-ee4787533ffe","html_url":"https://github.com/bodgit/puppet-postfix","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodgit%2Fpuppet-postfix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodgit%2Fpuppet-postfix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodgit%2Fpuppet-postfix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodgit%2Fpuppet-postfix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bodgit","download_url":"https://codeload.github.com/bodgit/puppet-postfix/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248537248,"owners_count":21120721,"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":["postfix","puppet"],"created_at":"2024-10-02T10:13:47.005Z","updated_at":"2025-10-31T07:38:10.383Z","avatar_url":"https://github.com/bodgit.png","language":"Puppet","readme":"# postfix\n\n[![Build Status](https://img.shields.io/github/workflow/status/bodgit/puppet-postfix/Test)](https://github.com/bodgit/puppet-postfix/actions?query=workflow%3ATest)\n[![Codecov](https://img.shields.io/codecov/c/github/bodgit/puppet-postfix)](https://codecov.io/gh/bodgit/puppet-postfix)\n[![Puppet Forge version](http://img.shields.io/puppetforge/v/bodgit/postfix)](https://forge.puppetlabs.com/bodgit/postfix)\n[![Puppet Forge downloads](https://img.shields.io/puppetforge/dt/bodgit/postfix)](https://forge.puppetlabs.com/bodgit/postfix)\n[![Puppet Forge - PDK version](https://img.shields.io/puppetforge/pdk-version/bodgit/postfix)](https://forge.puppetlabs.com/bodgit/postfix)\n\n#### Table of Contents\n\n1. [Description](#description)\n2. [Setup - The basics of getting started with postfix](#setup)\n    * [Beginning with postfix](#beginning-with-postfix)\n3. [Usage - Configuration options and additional functionality](#usage)\n4. [Reference - An under-the-hood peek at what the module is doing and how](#reference)\n5. [Limitations - OS compatibility, etc.](#limitations)\n6. [Development - Guide for contributing to the module](#development)\n\n## Description\n\nThis module manages Postfix.\n\nCentOS, RHEL, Scientific and Oracle Enterprise Linux is supported using Puppet\n5 or later.\n\n## Setup\n\n### Beginning with postfix\n\nConfigure Postfix with the defaults as shipped by the OS and managing any\naliases using the standard Puppet `mailalias` resource type:\n\n```puppet\ninclude postfix\n\npostfix::lookup::database { '/etc/aliases':\n  type =\u003e 'hash',\n}\n\nMailalias \u003c||\u003e -\u003e Postfix::Lookup::Database['/etc/aliases']\n```\n\n## Usage\n\nConfigure Postfix with an additional submission service running on TCP port\n587:\n\n```puppet\ninclude postfix\n\npostfix::master { 'submission/inet':\n  private =\u003e 'n',\n  chroot  =\u003e 'n',\n  command =\u003e 'smtpd -o smtpd_tls_security_level=encrypt -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject',\n}\n```\n\nConfigure Postfix for virtual mailbox hosting using LDAP to provide the\nvarious lookup tables:\n\n```puppet\nclass { 'postfix':\n  virtual_mailbox_base    =\u003e '/var/mail/vhosts',\n  virtual_mailbox_domains =\u003e ['ldap:/etc/postfix/virtualdomains.cf'],\n  virtual_mailbox_maps    =\u003e ['ldap:/etc/postfix/virtualrecipients.cf'],\n  virtual_minimum_uid     =\u003e 100,\n  virtual_uid_maps        =\u003e 'static:5000',\n  virtual_gid_maps        =\u003e 'static:5000',\n}\n\n# Specify connection defaults to enable sharing as per LDAP_README\nPostfix::Lookup::Ldap {\n  server_host =\u003e ['ldap://192.0.2.1'],\n  search_base =\u003e 'dc=example,dc=com',\n  bind_dn     =\u003e 'cn=Manager,dc=example,dc=com',\n  bind_pw     =\u003e 'secret',\n  version     =\u003e 3,\n}\n\npostfix::lookup::ldap { '/etc/postfix/virtualdomains.cf':\n  query_filter     =\u003e '(associatedDomain=%s)',\n  result_attribute =\u003e ['associatedDomain'],\n}\n\npostfix::lookup::ldap { '/etc/postfix/virtualrecipients.cf':\n  query_filter     =\u003e '(mail=%s)',\n  result_attribute =\u003e ['mail'],\n}\n```\n\nExtend the above example to use `dovecot-lda(1)` instead of `virtual(8)`:\n\n```puppet\ninclude dovecot\n\nclass { 'postfix':\n  virtual_transport       =\u003e 'dovecot'\n  virtual_mailbox_domains =\u003e ['ldap:/etc/postfix/virtualdomains.cf'],\n  virtual_mailbox_maps    =\u003e ['ldap:/etc/postfix/virtualrecipients.cf'],\n}\n\npostfix::main { 'dovecot_destination_recipient_limit':\n  value =\u003e 1,\n}\n\npostfix::master { 'dovecot/unix':\n  chroot       =\u003e 'n',\n  command      =\u003e 'pipe flags=DRhu user=vmail:vmail argv=/path/to/dovecot-lda -f ${sender} -d ${recipient}',\n  unprivileged =\u003e 'n',\n  require      =\u003e Class['dovecot'],\n}\n\n# Specify connection defaults to enable sharing as per LDAP_README\nPostfix::Lookup::Ldap {\n  server_host =\u003e ['ldap://192.0.2.1'],\n  search_base =\u003e 'dc=example,dc=com',\n  bind_dn     =\u003e 'cn=Manager,dc=example,dc=com',\n  bind_pw     =\u003e 'secret',\n  version     =\u003e 3,\n}\n\npostfix::lookup::ldap { '/etc/postfix/virtualdomains.cf':\n  query_filter     =\u003e '(associatedDomain=%s)',\n  result_attribute =\u003e ['associatedDomain'],\n}\n\npostfix::lookup::ldap { '/etc/postfix/virtualrecipients.cf':\n  query_filter     =\u003e '(mail=%s)',\n  result_attribute =\u003e ['mail'],\n}\n```\n\n## Reference\n\nThe reference documentation is generated with\n[puppet-strings](https://github.com/puppetlabs/puppet-strings) and the latest\nversion of the documentation is hosted at\n[https://bodgit.github.io/puppet-postfix/](https://bodgit.github.io/puppet-postfix/)\nand available also in the [REFERENCE.md](https://github.com/bodgit/puppet-postfix/blob/main/REFERENCE.md).\n\n## Limitations\n\nThis module takes the (somewhat laborious) approach of creating parameters for\neach `main.cf` setting rather than just pass in a large hash of settings,\nwhich should result in more control.\n\nThe only settings deliberately excluded are the following:\n\n* `${transport}_delivery_slot_cost`\n* `${transport}_delivery_slot_discount`\n* `${transport}_delivery_slot_loan`\n* `${transport}_destination_concurrency_failed_cohort_limit`\n* `${transport}_destination_concurrency_limit`\n* `${transport}_destination_concurrency_negative_feedback`\n* `${transport}_destination_concurrency_positive_feedback`\n* `${transport}_destination_rate_delay`\n* `${transport}_destination_recipient_limit`\n* `${transport}_extra_recipient_limit`\n* `${transport}_minimum_delivery_slots`\n* `${transport}_recipient_limit`\n* `${transport}_recipient_refill_delay`\n* `${transport}_recipient_refill_limit`\n\nFor these, use the `postfix::main` defined type.\n\nBecause Postfix allows you to recursively define parameters in terms of other\nparameters it makes validating values impossible unless that convention is\nforbidden. Currently this module allows recursive parameter expansion and so\nonly validates that values are either strings or arrays (of strings).\n\nAny setting that accepts a boolean `yes`/`no` value also accepts native Puppet\nboolean values. Any multi-valued setting accepts an array of values.\n\nFor referring to other settings, ensure that the `$` is escaped appropriately\nusing either `\\` or `''` to prevent Puppet expanding the variable itself.\n\nThis module has been built on and tested against Puppet 5 and higher.\n\nThe module has been tested on:\n\n* Red Hat/CentOS Enterprise Linux 6/7/8\n\n## Development\n\nThe module relies on [PDK](https://puppet.com/docs/pdk/1.x/pdk.html) and has\nboth [rspec-puppet](http://rspec-puppet.com) and\n[Litmus](https://github.com/puppetlabs/puppet_litmus) tests. Run them\nwith:\n\n```\n$ bundle exec rake spec\n$ bundle exec rake litmus:*\n```\n\nPlease log issues or pull requests at\n[github](https://github.com/bodgit/puppet-postfix).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodgit%2Fpuppet-postfix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbodgit%2Fpuppet-postfix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodgit%2Fpuppet-postfix/lists"}