summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2021-04-14 19:32:14 -0300
committerSilvio Rhatto <rhatto@riseup.net>2021-04-14 19:32:14 -0300
commit516ed2041f3ff0d893ed116b11179e4c7ae2ad09 (patch)
tree05a9b373045887cf3ffa65fd079e8e53e82268e6
parent5eb3dca39ea4c01eb38a8c6f329e6d5e9c845732 (diff)
downloadpuppet-mail-516ed2041f3ff0d893ed116b11179e4c7ae2ad09.tar.gz
puppet-mail-516ed2041f3ff0d893ed116b11179e4c7ae2ad09.tar.bz2
Fix debian bug 903161
-rw-r--r--manifests/dovecot.pp12
-rw-r--r--manifests/virtual.pp4
-rw-r--r--templates/dovecot/dovecot.conf.buster.erb23
3 files changed, 37 insertions, 2 deletions
diff --git a/manifests/dovecot.pp b/manifests/dovecot.pp
index d76ae79..f0ab0dd 100644
--- a/manifests/dovecot.pp
+++ b/manifests/dovecot.pp
@@ -1,9 +1,17 @@
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":
diff --git a/manifests/virtual.pp b/manifests/virtual.pp
index df2f364..c548ba1 100644
--- a/manifests/virtual.pp
+++ b/manifests/virtual.pp
@@ -31,12 +31,16 @@ class mail::virtual(
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'],
}
}
diff --git a/templates/dovecot/dovecot.conf.buster.erb b/templates/dovecot/dovecot.conf.buster.erb
index 94c4f09..a515e35 100644
--- a/templates/dovecot/dovecot.conf.buster.erb
+++ b/templates/dovecot/dovecot.conf.buster.erb
@@ -73,3 +73,26 @@ protocol lda {
# 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
+ }
+}