-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Wrapped ${mailbox.name} in "s to allow for space in mailbox names. #34629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks. Also backported to stable as 5e35f55. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't an additional escape [ ''"'' ]
be applied?
@dotlambda Turns out dovecot does not specify how to escape these. Escaping via
|
Has a fix been submitted? Don't forget to also backport. |
How about asserting |
@dotlambda @FRidh Unfortunately I don't have the time to work on this any more for the time being. This being said I think the check for |
Okay, I'll implement the check and make a PR |
I think this should be the easiest way: diff --git a/nixos/modules/services/mail/dovecot.nix b/nixos/modules/services/mail/dovecot.nix
index c5cb06cf54e..1408de4e162 100644
--- a/nixos/modules/services/mail/dovecot.nix
+++ b/nixos/modules/services/mail/dovecot.nix
@@ -113,7 +113,7 @@ let
mailboxes = { lib, pkgs, ... }: {
options = {
name = mkOption {
- type = types.str;
+ type = types.strMatching ''[^"]+'';
example = "Spam";
description = "The name of the mailbox.";
}; What do you think? |
Motivation for this change
Without this fix the following nix expression:
becomes
but it should be
or else dovecot2 won't start
Feb 05 16:00:28 nixos dovecot2-pre-start[20738]: doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 36: Expecting '{'
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)