2 class salsa::mail inherits salsa {
22 shell => '/bin/false',
26 ensure => 'directory',
32 $pw_salt = hkdf('/etc/puppet/secret', "mail-imap-dovecot-${::hostname}-${salsa::servicename}-${salsa::mail_username}-salt-generator")
33 $hashed_pw = pw_hash($salsa::mail_password, 'SHA-512', $pw_salt)
34 file { '/etc/dovecot/users':
38 ${salsa::mail_username}:${hashed_pw}:::
42 file { '/etc/dovecot/conf.d/10-auth.conf':
44 auth_mechanisms = plain
45 disable_plaintext_auth = no
49 args = scheme=CRYPT username_format=%u /etc/dovecot/users
54 args = username_format=%u /etc/dovecot/users
55 default_fields = uid=_vmail gid=_vmail home=/srv/mail/%u
58 notify => Service['dovecot'],
60 file { '/etc/dovecot/local.conf':
62 mail_location = maildir:~/Maildir
71 unix_listener /var/spool/postfix/private/dovecot-lmtp {
80 notify => Service['dovecot'],
83 concat::fragment { 'puppet-postfix-main.cf--salsa':
84 target => '/etc/postfix/main.cf',
87 recipient_delimiter = +
90 virtual_transport = lmtp:unix:private/dovecot-lmtp
91 virtual_mailbox_domains = ${salsa::servicename}
92 virtual_alias_maps = hash:/etc/postfix/virtual
96 exec { '/usr/sbin/postmap /etc/postfix/virtual':
98 require => Package['postfix'],
100 file { '/etc/postfix/virtual':
102 postmaster@${salsa::servicename} postmaster@debian.org
103 admin@${salsa::servicename} salsa-admin@debian.org
105 notify => Exec['/usr/sbin/postmap /etc/postfix/virtual'],