diff --git a/dovecot/files/passdb-pam.conf b/dovecot/files/passdb-pam.conf new file mode 100644 index 0000000..353e1de --- /dev/null +++ b/dovecot/files/passdb-pam.conf @@ -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. +passdb { + driver = pam + # [session=yes] [setcred=yes] [failure_show_msg=yes] [max_requests=] + # [cache_key=] [] + args = session=yes # To trigger pam_mkhomedir +} diff --git a/dovecot/manifests/dovecot2.pp b/dovecot/manifests/dovecot2.pp index 3231398..5eb4307 100644 --- a/dovecot/manifests/dovecot2.pp +++ b/dovecot/manifests/dovecot2.pp @@ -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: {