class mail::dovecot {
+ group { 'dovecot':
+ ensure => present,
+ }
+
+ user { 'dovecot':
+ ensure => present,
+ gid => 'dovecot',
+ require => Group['dovecot'],
+ }
- # Dovecot
service { "dovecot":
ensure => running,
- require => [ Package['dovecot-imapd'], File['/etc/dovecot/dovecot.conf', '/etc/dovecot/dovecot-sql.conf'] ],
+ require => [ Package['dovecot-imapd'], File['/etc/dovecot/dovecot.conf', '/etc/dovecot/dovecot-sql.conf'], User['dovecot'], ],
}
file { "/etc/dovecot/dovecot.conf":
gid => 5000,
}
+ # The vmail user maybe needs to be in the dovecot group to be able to use the stats-writer
+ # See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903161
user { "vmail":
ensure => present,
uid => 5000,
gid => "vmail",
password => "*",
home => '/var/mail/virtual',
+ #groups => [ 'dovecot', ],
+ #require => Group['vmail', 'dovecot'],
require => Group['vmail'],
}
}
# Should saving a mail to a non-existing mailbox automatically create it?
lda_mailbox_autocreate = yes
+
+# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903161
+service stats {
+ unix_listener stats-reader {
+ mode = 0
+ }
+ unix_listener stats-writer {
+ mode = 0
+ }
+}
+
+# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903161
+service old-stats {
+ fifo_listener old-stats-mail {
+ mode = 0
+ }
+ fifo_listener old-stats-user {
+ mode = 0
+ }
+ unix_listener old-stats {
+ mode = 0
+ }
+}