guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: services: dovecot: Allow to set 'client-limit'.


From: Clément Lassieur
Subject: 01/03: services: dovecot: Allow to set 'client-limit'.
Date: Sat, 10 Nov 2018 13:13:50 -0500 (EST)

snape pushed a commit to branch master
in repository guix.

commit 8d9bb4b4d05a20bef1cf7b1da2b1c5fb05f9b071
Author: Clément Lassieur <address@hidden>
Date:   Sat Nov 10 15:14:28 2018 +0100

    services: dovecot: Allow to set 'client-limit'.
    
    * doc/guix.texi (Mail Services): Update accordingly.
    * gnu/services/mail.scm (service-configuration)[client-limit]: New field.
    (dovecot-configuration)[services]: Set 'client-limit' to its correct default
    value.
---
 doc/guix.texi         | 10 ++++++++++
 gnu/services/mail.scm | 27 ++++++++++++++++++++++-----
 2 files changed, 32 insertions(+), 5 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 441b65b..d4178ce 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -14349,6 +14349,16 @@ Defaults to @samp{#t}.
 
 @end deftypevr
 
address@hidden address@hidden parameter} non-negative-integer client-limit
+Maximum number of simultaneous client connections per process.  Once
+this number of connections is received, the next incoming connection
+will prompt Dovecot to spawn another process.  If set to 0,
address@hidden is used instead.
+
+Defaults to @samp{0}.
+
address@hidden deftypevr
+
 @deftypevr address@hidden parameter} non-negative-integer service-count
 Number of connections to handle before starting a new process.
 Typically the only useful values are 0 (unlimited) or 1.  1 is more
diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm
index 573efa0..abc1c15 100644
--- a/gnu/services/mail.scm
+++ b/gnu/services/mail.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Andy Wingo <address@hidden>
-;;; Copyright © 2017 Clément Lassieur <address@hidden>
+;;; Copyright © 2017, 2018 Clément Lassieur <address@hidden>
 ;;; Copyright © 2017 Carlo Zancanaro <address@hidden>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <address@hidden>
 ;;;
@@ -290,6 +290,12 @@ the section name.")
    "Listeners for the service.  A listener is either an
 @code{unix-listener-configuration}, a @code{fifo-listener-configuration}, or
 an @code{inet-listener-configuration}.")
+  (client-limit
+   (non-negative-integer 0)
+   "Maximum number of simultaneous client connections per process.  Once this
+number of connections is received, the next incoming connection will prompt
+Dovecot to spawn another process.  If set to 0, @code{default-client-limit} is
+used instead.")
   (service-count
    (non-negative-integer 1)
    "Number of connections to handle before starting a new process.
@@ -475,6 +481,7 @@ complex, customize the address and port fields of the
     (list
      (service-configuration
       (kind "imap-login")
+      (client-limit 0)
       (listeners
        (list
         (inet-listener-configuration (protocol "imap") (port 143) (ssl? #f))
@@ -487,10 +494,15 @@ complex, customize the address and port fields of the
         (inet-listener-configuration (protocol "pop3s") (port 995) (ssl? 
#t)))))
      (service-configuration
       (kind "lmtp")
+      (client-limit 1)
       (listeners
        (list (unix-listener-configuration (path "lmtp") (mode "0666")))))
-     (service-configuration (kind "imap"))
-     (service-configuration (kind "pop3"))
+     (service-configuration
+      (kind "imap")
+      (client-limit 1))
+     (service-configuration
+      (kind "pop3")
+      (client-limit 1))
      (service-configuration (kind "auth")
       ;; In what could be taken to be a bug, the default value of 1 for
       ;; service-count makes it so that a PAM auth worker can't fork off
@@ -501,10 +513,15 @@ complex, customize the address and port fields of the
       ;; is the default for all other services.  As a hack, bump this value to
       ;; 30.
       (service-count 30)
+      (client-limit 0)
       (listeners
        (list (unix-listener-configuration (path "auth-userdb")))))
-     (service-configuration (kind "auth-worker"))
-     (service-configuration (kind "dict")
+     (service-configuration
+      (kind "auth-worker")
+      (client-limit 1))
+     (service-configuration
+      (kind "dict")
+      (client-limit 1)
       (listeners (list (unix-listener-configuration (path "dict")))))))
    "List of services to enable.  Available services include @samp{imap},
 @samp{imap-login}, @samp{pop3}, @samp{pop3-login}, @samp{auth}, and



reply via email to

[Prev in Thread] Current Thread [Next in Thread]