From: ludo@gnu.org (Ludovic Courtès)
To: Andy Wingo <wingo@igalia.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 2/2] gnu: Add dovecot service
Date: Tue, 15 Dec 2015 23:58:41 +0100 [thread overview]
Message-ID: <87fuz3co9q.fsf@gnu.org> (raw)
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")
Andy Wingo <wingo@igalia.com> 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’s
configuration model is stable enough that this won’t have to change
much? Is a “cheat mode” (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 ‘dovecot-error’ procedure instead of ‘error’,
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’.
next prev parent reply other threads:[~2015-12-15 22:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-14 21:09 [PATCH 1/2] gnu: dovecot: Add linux-pam to inputs Andy Wingo
2015-12-14 21:09 ` [PATCH 2/2] gnu: Add dovecot service Andy Wingo
2015-12-15 22:58 ` Ludovic Courtès [this message]
2015-12-16 8:04 ` Andy Wingo
2015-12-16 23:14 ` Leo Famulari
2015-12-17 9:22 ` Andy Wingo
2015-12-17 14:23 ` Ludovic Courtès
2015-12-17 15:38 ` Christopher Allan Webber
2015-12-18 0:59 ` Leo Famulari
2015-12-18 9:26 ` Andy Wingo
2015-12-15 22:45 ` [PATCH 1/2] gnu: dovecot: Add linux-pam to inputs Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fuz3co9q.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=wingo@igalia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.