mirror of
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git
synced 2024-12-27 07:26:22 +01:00
Remove non longer supported configurations (<21.05)
This commit is contained in:
parent
864ea5bfef
commit
9578dbac69
2 changed files with 18 additions and 33 deletions
37
default.nix
37
default.nix
|
@ -421,27 +421,24 @@ in
|
||||||
The mailboxes for dovecot.
|
The mailboxes for dovecot.
|
||||||
Depending on the mail client used it might be necessary to change some mailbox's name.
|
Depending on the mail client used it might be necessary to change some mailbox's name.
|
||||||
'';
|
'';
|
||||||
default = let
|
default = {
|
||||||
defMailBoxes = {
|
Trash = {
|
||||||
Trash = {
|
auto = "no";
|
||||||
auto = "no";
|
specialUse = "Trash";
|
||||||
specialUse = "Trash";
|
|
||||||
};
|
|
||||||
Junk = {
|
|
||||||
auto = "subscribe";
|
|
||||||
specialUse = "Junk";
|
|
||||||
};
|
|
||||||
Drafts = {
|
|
||||||
auto = "subscribe";
|
|
||||||
specialUse = "Drafts";
|
|
||||||
};
|
|
||||||
Sent = {
|
|
||||||
auto = "subscribe";
|
|
||||||
specialUse = "Sent";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
in if (versionAtLeast version "20.09pre") then defMailBoxes
|
Junk = {
|
||||||
else (flip mapAttrsToList defMailBoxes (name: options: { inherit name; } // options));
|
auto = "subscribe";
|
||||||
|
specialUse = "Junk";
|
||||||
|
};
|
||||||
|
Drafts = {
|
||||||
|
auto = "subscribe";
|
||||||
|
specialUse = "Drafts";
|
||||||
|
};
|
||||||
|
Sent = {
|
||||||
|
auto = "subscribe";
|
||||||
|
specialUse = "Sent";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
certificateScheme = mkOption {
|
certificateScheme = mkOption {
|
||||||
|
|
|
@ -18,25 +18,13 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.mailserver;
|
cfg = config.mailserver;
|
||||||
clamHasSettings = options.services.clamav.daemon ? settings;
|
|
||||||
in
|
in
|
||||||
with lib;
|
|
||||||
{
|
{
|
||||||
config = lib.mkIf (cfg.enable && cfg.virusScanning) {
|
config = lib.mkIf (cfg.enable && cfg.virusScanning) {
|
||||||
|
|
||||||
# Remove extraConfig and settings conditional after 20.09 support is removed
|
|
||||||
|
|
||||||
services.clamav.daemon = {
|
services.clamav.daemon = {
|
||||||
enable = true;
|
enable = true;
|
||||||
} // (if clamHasSettings then {
|
|
||||||
settings.PhishingScanURLs = "no";
|
settings.PhishingScanURLs = "no";
|
||||||
} else {
|
};
|
||||||
extraConfig = ''
|
|
||||||
PhishingScanURLs no
|
|
||||||
'';
|
|
||||||
});
|
|
||||||
|
|
||||||
services.clamav.updater.enable = true;
|
services.clamav.updater.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue