Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postfix-ldap required for ldap lookup type on RHEL8+ #398

Merged
merged 2 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ The following parameters are available in the `postfix` class:
* [`ldap_base`](#-postfix--ldap_base)
* [`ldap_host`](#-postfix--ldap_host)
* [`ldap_options`](#-postfix--ldap_options)
* [`ldap_packages`](#-postfix--ldap_packages)
* [`lookup_table_type`](#-postfix--lookup_table_type)
* [`mail_user`](#-postfix--mail_user)
* [`mailman`](#-postfix--mailman)
Expand Down Expand Up @@ -257,6 +258,14 @@ Example: `start_tls = yes`.

Default value: `undef`

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

Data type: `Array[String[1]]`

An array of package names to install for LDAP support if $ldap is true.

Default value: `[]`

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

Data type: `String`
Expand Down
1 change: 1 addition & 0 deletions data/osfamily/Debian.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
postfix::params::mailx_package: 'bsd-mailx'
postfix::params::master_os_template: 'postfix/master.cf.debian.erb'
postfix::ldap_packages: ['postfix-ldap']
...
1 change: 1 addition & 0 deletions data/osfamily/RedHat/9.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---

postfix::params::mailx_package: 's-nail'
postfix::ldap_packages: ['postfix-ldap']
4 changes: 4 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@
# A free form string that can define any LDAP options to be passed through (ldap_table(5)).
# Example: `start_tls = yes`.
#
# @param ldap_packages
# An array of package names to install for LDAP support if $ldap is true.
#
# @param lookup_table_type
# Table format type as described in http://www.postfix.org/DATABASE_README.html#types.
# Type has to be supported by system, see "postconf -m" for supported types.
Expand Down Expand Up @@ -262,6 +265,7 @@
Optional[String] $ldap_base = undef,
Optional[String] $ldap_host = undef,
Optional[String] $ldap_options = undef,
Array[String[1]] $ldap_packages = [],
String $lookup_table_type = 'hash',
String $mail_user = 'vmail', # postfix_mail_user
Boolean $mailman = false,
Expand Down
7 changes: 3 additions & 4 deletions manifests/ldap.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
assert_type(String, $postfix::ldap_host)
assert_type(String, $postfix::ldap_options)

if $facts['os']['family'] == 'Debian' {
package { 'postfix-ldap':
before => File["${postfix::confdir}/ldap-aliases.cf"],
}
package { $postfix::ldap_packages:
ensure => installed,
before => File["${postfix::confdir}/ldap-aliases.cf"],
}

if ! $postfix::ldap_base {
Expand Down
Loading