From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 2/2] gnu: Add dovecot service Date: Tue, 15 Dec 2015 23:58:41 +0100 Message-ID: <87fuz3co9q.fsf@gnu.org> References: <1450127388-8654-1-git-send-email-wingo@igalia.com> <1450127388-8654-2-git-send-email-wingo@igalia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8yYS-0005qW-U3 for guix-devel@gnu.org; Tue, 15 Dec 2015 17:58:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8yYO-0002xJ-TP for guix-devel@gnu.org; Tue, 15 Dec 2015 17:58:48 -0500 In-Reply-To: <1450127388-8654-2-git-send-email-wingo@igalia.com> (Andy Wingo's message of "Mon, 14 Dec 2015 22:09:48 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Andy Wingo Cc: guix-devel@gnu.org Andy Wingo skribis: > * gnu/services/mail.scm: New file. > (dovecot-service, dovecot-configuration, dict-configuration) > (passdb-configuration, userdb-configuration) > (unix-listener-configuration, fifo-listener-configuration) > (inet-listener-configuration, service-configuration) > (protocol-configuration, plugin-configuration, mailbox-configuration) > (namespace-configuration): New public variables. > > * gnu-system.am (GNU_SYSTEM_MODULES): Add (gnu services mail). > > * doc/guix.texi (Mail Services): New node. Impressive piece of work! Really nice. Regarding the Schemefied configuration, do you think Dovecot=E2=80=99s configuration model is stable enough that this won=E2=80=99t have to change much? Is a =E2=80=9Ccheat mode=E2=80=9D (where one can pass raw strings to= paste into the configuration file) needed? > +To add IMAP support to a GuixSD system, add a @code{dovecot-service} to s|IMAP support|an IMAP/POP3 email server| > +@c The following documentation was initially generated by > +@c (generate-documentation) in (gnu services mail). Manually maintained > +@c documentation is better, so we shouldn't hesitate to edit below as > +@c needed. However if the change you want to make to this documentation > +@c can be done in an automated way, it's probably easier to change > +@c (generate-documentation) than to make it below and have to deal with > +@c the churn as dovecot updates. Makes sense to me! > +(define-configuration unix-listener-configuration > + (path > + (file-name (error "unix listener path required")) > + "The file name on which to listen.") s/path/file-name/ maybe We should probably use a =E2=80=98dovecot-error=E2=80=99 procedure instead = of =E2=80=98error=E2=80=99, like: (define (dovecot-error message) (raise (condition (&message (message message)) (&dovecot-configuration-error)))) This would be better handled by the UI and possibly other users. WDYT? > +(define (validate-configuration config fields) > + (for-each (lambda (field) > + (let ((val ((configuration-field-getter field) config))) > + (unless ((configuration-field-predicate field) val) > + (error "Invalid value for field:" > + (configuration-field-name field) val)))) > + fields)) > + > +(define (validate-package field-name package) > + (unless (package? package) > + (error "not a package" package))) Likewise here. Otherwise LGTM. Thank you! Ludo=E2=80=99.