]> gitweb.fluxo.info Git - puppet-mail.git/commitdiff
Fix debian bug 903161
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 14 Apr 2021 22:32:14 +0000 (19:32 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 14 Apr 2021 22:32:14 +0000 (19:32 -0300)
manifests/dovecot.pp
manifests/virtual.pp
templates/dovecot/dovecot.conf.buster.erb

index d76ae79f507a4b4e988f3e6c967981da606d0e9d..f0ab0dd85cc77691fd67db099688c3c208579444 100644 (file)
@@ -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":
index df2f3644e4d94040201e7e631b589694632d9535..c548ba199db723650cc238ec538b2f51e27f7109 100644 (file)
@@ -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'],
   }
 }
index 94c4f09ee858582c0c6379f2c10263dd9e82234c..a515e351d5137e6baf768bef1be2d2899deb2e57 100644 (file)
@@ -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
+  }
+}