mirror of
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git
synced 2024-12-25 14:36:08 +01:00
dovecot: add support store mailbox names on disk using UTF-8
This commit is contained in:
parent
84783b661e
commit
008d78cc21
2 changed files with 10 additions and 1 deletions
|
@ -574,6 +574,14 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
useUTF8FolderNames = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Store mailbox names on disk using UTF-8 instead of modified UTF-7 (mUTF-7).
|
||||
'';
|
||||
};
|
||||
|
||||
hierarchySeparator = mkOption {
|
||||
type = types.str;
|
||||
default = ".";
|
||||
|
|
|
@ -29,10 +29,11 @@ let
|
|||
bool2int = x: if x then "1" else "0";
|
||||
|
||||
maildirLayoutAppendix = lib.optionalString cfg.useFsLayout ":LAYOUT=fs";
|
||||
maildirUTF8FolderNames = lib.optionalString cfg.useUTF8FolderNames ":UTF-8";
|
||||
|
||||
# maildir in format "/${domain}/${user}"
|
||||
dovecotMaildir =
|
||||
"maildir:${cfg.mailDirectory}/%d/%n${maildirLayoutAppendix}"
|
||||
"maildir:${cfg.mailDirectory}/%d/%n${maildirLayoutAppendix}${maildirUTF8FolderNames}"
|
||||
+ (lib.optionalString (cfg.indexDir != null)
|
||||
":INDEX=${cfg.indexDir}/%d/%n"
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue