Unverified Commit b3965efb authored by Kenyon Ralph's avatar Kenyon Ralph Committed by GitHub
Browse files

Merge pull request #468 from vchepkov/fedora-defaults

make main.cf binary paths configurable and add Fedora defaults
parents 00961bd5 a8c421ba
Loading
Loading
Loading
Loading
+27
Changes for REFERENCE.md: 27 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -110,6 +110,7 @@ The following parameters are available in the `postfix` class:
* [`mailaliases`](#-postfix--mailaliases)
* [`mail_user`](#-postfix--mail_user)
* [`mailman`](#-postfix--mailman)
* [`mailq_path`](#-postfix--mailq_path)
* [`mailx_ensure`](#-postfix--mailx_ensure)
* [`mailx_package`](#-postfix--mailx_package)
* [`maincf_source`](#-postfix--maincf_source)
@@ -137,6 +138,7 @@ The following parameters are available in the `postfix` class:
* [`mydestination`](#-postfix--mydestination)
* [`mynetworks`](#-postfix--mynetworks)
* [`myorigin`](#-postfix--myorigin)
* [`newaliases_path`](#-postfix--newaliases_path)
* [`postfix_ensure`](#-postfix--postfix_ensure)
* [`postfix_package`](#-postfix--postfix_package)
* [`relayhost`](#-postfix--relayhost)
@@ -145,6 +147,7 @@ The following parameters are available in the `postfix` class:
* [`root_mail_recipient`](#-postfix--root_mail_recipient)
* [`satellite`](#-postfix--satellite)
* [`seltype`](#-postfix--seltype)
* [`sendmail_path`](#-postfix--sendmail_path)
* [`service_enabled`](#-postfix--service_enabled)
* [`service_ensure`](#-postfix--service_ensure)
* [`smtp_listen`](#-postfix--smtp_listen)
@@ -333,6 +336,14 @@ mailman mailing list manager.

Default value: `false`

##### <a name="-postfix--mailq_path"></a>`mailq_path`

Data type: `Optional[Stdlib::Absolutepath]`

Optional path for the mailq_path parameter in main.cf.

Default value: `undef`

##### <a name="-postfix--mailx_ensure"></a>`mailx_ensure`

Data type: `String`
@@ -577,6 +588,14 @@ Example: `example.com`

Default value: `$facts['networking']['fqdn']`

##### <a name="-postfix--newaliases_path"></a>`newaliases_path`

Data type: `Optional[Stdlib::Absolutepath]`

Optional path for the newaliases_path parameter in main.cf.

Default value: `undef`

##### <a name="-postfix--postfix_ensure"></a>`postfix_ensure`

Data type: `String`
@@ -644,6 +663,14 @@ Selinux type for /etc/postfix/* config files

Default value: `undef`

##### <a name="-postfix--sendmail_path"></a>`sendmail_path`

Data type: `Optional[Stdlib::Absolutepath]`

Optional path for the sendmail_path parameter in main.cf.

Default value: `undef`

##### <a name="-postfix--service_enabled"></a>`service_enabled`

Data type: `Boolean`
+4
Changes for data/os/Fedora.yaml: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
---
postfix::ldap_packages: ['postfix-ldap']
postfix::mta_bin_path: '/usr/bin/sendmail.postfix'
postfix::sendmail_path: '/usr/bin/sendmail.postfix'
+3
Changes for data/osfamily/RedHat.yaml: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -4,4 +4,7 @@ postfix::seltype: 'postfix_etc_t'
postfix::mailx_package: 's-nail'
postfix::master_os_template: 'postfix/master.cf.redhat.erb'
postfix::mta_bin_path: '/usr/sbin/sendmail.postfix'
postfix::mailq_path: '/usr/bin/mailq.postfix'
postfix::newaliases_path: '/usr/bin/newaliases.postfix'
postfix::sendmail_path: '/usr/sbin/sendmail.postfix'
...
+11 −7
Changes for manifests/files.pp: 11 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -22,6 +22,9 @@ class postfix::files {
  $master_bounce_command = $postfix::master_bounce_command
  $master_defer_command  = $postfix::master_defer_command
  $myorigin            = $postfix::myorigin
  $mailq_path          = $postfix::mailq_path
  $newaliases_path     = $postfix::newaliases_path
  $sendmail_path       = $postfix::sendmail_path
  $manage_mailname     = $postfix::manage_mailname
  $manage_aliases      = $postfix::manage_aliases
  $manage_root_alias   = $postfix::manage_root_alias
@@ -108,15 +111,16 @@ class postfix::files {
    'myorigin':         value => $myorigin;
  }

  case $facts['os']['family'] {
    'RedHat': {
      postfix::config {
        'mailq_path':       value => '/usr/bin/mailq.postfix';
        'newaliases_path':  value => '/usr/bin/newaliases.postfix';
        'sendmail_path':    value => '/usr/sbin/sendmail.postfix';
  if $mailq_path {
    postfix::config { 'mailq_path': value => $mailq_path }
  }

  if $newaliases_path {
    postfix::config { 'newaliases_path': value => $newaliases_path }
  }
    default: {}

  if $sendmail_path {
    postfix::config { 'sendmail_path': value => $sendmail_path }
  }

  if $manage_aliases and $manage_root_alias {
+12
Changes for manifests/init.pp: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -113,6 +113,9 @@
#   A Boolean defining whether to configure a basic smtp server that is able to work for the
#   mailman mailing list manager.
#
# @param mailq_path
#   Optional path for the mailq_path parameter in main.cf.
#
# @param mailx_ensure
#   Installs mailx package
#
@@ -223,6 +226,9 @@
#   A string to define the myorigin parameter that holds the domain name that mail appears to come from (postconf(5)).
#   Example: `example.com`
#
# @param newaliases_path
#   Optional path for the newaliases_path parameter in main.cf.
#
# @param postfix_ensure
#   The ensure value of the postfix package
#
@@ -250,6 +256,9 @@
# @param seltype
#   Selinux type for /etc/postfix/* config files
#
# @param sendmail_path
#   Optional path for the sendmail_path parameter in main.cf.
#
# @param service_enabled
#   Defines if the service 'postfix' is enabled on the system
#
@@ -305,6 +314,7 @@ class postfix (
  Hash $mailaliases = {},
  String $mail_user = 'vmail', # postfix_mail_user
  Boolean $mailman = false,
  Optional[Stdlib::Absolutepath] $mailq_path = undef,
  String $mailx_ensure = 'present',
  String[1] $mailx_package = 'mailx',
  String $maincf_source = "puppet:///modules/${module_name}/main.cf",
@@ -332,6 +342,7 @@ class postfix (
  String $mydestination = '$myhostname, localhost.$mydomain, localhost', # postfix_mydestination
  String $mynetworks = '127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128', # postfix_mynetworks
  String $myorigin = $facts['networking']['fqdn'],
  Optional[Stdlib::Absolutepath] $newaliases_path = undef,
  String $postfix_ensure = 'present',
  String[1] $postfix_package = 'postfix',
  Optional[String] $relayhost = undef, # postfix_relayhost
@@ -340,6 +351,7 @@ class postfix (
  Variant[Array[String], String] $root_mail_recipient = 'nobody', # root_mail_recipient
  Boolean $satellite = false,
  Optional[String[1]] $seltype = undef,
  Optional[Stdlib::Absolutepath] $sendmail_path = undef,
  Boolean $service_enabled =  true,
  String $service_ensure = 'running',
  Variant[Array[String[1]], String[1]] $smtp_listen = '127.0.0.1', # postfix_smtp_listen
Loading