Make it possible to inject custom config files to be included in custom order for Dovecot v2.x.
Maybe this can replace the 99-local.conf in near future?
This commit is contained in:
parent
f254f1a33d
commit
6deadc4369
2 changed files with 45 additions and 0 deletions
10
dovecot/files/passdb-pam.conf
Normal file
10
dovecot/files/passdb-pam.conf
Normal file
|
@ -0,0 +1,10 @@
|
|||
# PAM authentication. Preferred nowadays by most systems.
|
||||
# PAM is typically used with either userdb passwd or userdb static.
|
||||
# REMEMBER: You'll need /etc/pam.d/dovecot file created for PAM
|
||||
# authentication to actually work. <doc/wiki/PasswordDatabase.PAM.txt>
|
||||
passdb {
|
||||
driver = pam
|
||||
# [session=yes] [setcred=yes] [failure_show_msg=yes] [max_requests=<n>]
|
||||
# [cache_key=<key>] [<service name>]
|
||||
args = session=yes # To trigger pam_mkhomedir
|
||||
}
|
|
@ -1,4 +1,39 @@
|
|||
|
||||
# Install custom config to Dovecot
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# $name:
|
||||
# Config name.
|
||||
#
|
||||
# $idx:
|
||||
# Config load order. Defaults to 99.
|
||||
#
|
||||
# === Sample usage
|
||||
#
|
||||
# ldap::server::schema { "passdb-pam": idx => 09 }
|
||||
#
|
||||
define dovecot::server::config($idx = 90) {
|
||||
|
||||
include dovecot::server::v2
|
||||
|
||||
file { "${name}.conf":
|
||||
ensure => present,
|
||||
path => "/etc/dovecot/conf.d/${idx}-${name}.conf",
|
||||
source => [ "puppet:///files/dovecot/${name}.conf",
|
||||
"puppet:///modules/dovecot/${name}.conf", ],
|
||||
mode => "0644",
|
||||
owner => "root",
|
||||
group => $::operatingsystem ? {
|
||||
"openbsd" => "wheel",
|
||||
default => "root",
|
||||
},
|
||||
notify => Service["dovecot"],
|
||||
require => Package["dovecot"],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class dovecot::server::v2 {
|
||||
case $operatingsystem {
|
||||
centos,fedora: {
|
||||
|
|
Loading…
Add table
Reference in a new issue