diff --git a/mail-server/clamav.nix b/mail-server/clamav.nix
index 25418f0..0dafd4f 100644
--- a/mail-server/clamav.nix
+++ b/mail-server/clamav.nix
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
-{ config, pkgs, lib, options, ... }:
+{ config, lib, ... }:
let
cfg = config.mailserver;
diff --git a/mail-server/dovecot.nix b/mail-server/dovecot.nix
index 27af741..6704426 100644
--- a/mail-server/dovecot.nix
+++ b/mail-server/dovecot.nix
@@ -39,27 +39,6 @@ let
);
postfixCfg = config.services.postfix;
- dovecot2Cfg = config.services.dovecot2;
-
- stateDir = "/var/lib/dovecot";
-
- pipeBin = pkgs.stdenv.mkDerivation {
- name = "pipe_bin";
- src = ./dovecot/pipe_bin;
- buildInputs = with pkgs; [ makeWrapper coreutils bash rspamd ];
- buildCommand = ''
- mkdir -p $out/pipe/bin
- cp $src/* $out/pipe/bin/
- chmod a+x $out/pipe/bin/*
- patchShebangs $out/pipe/bin
-
- for file in $out/pipe/bin/*; do
- wrapProgram $file \
- --set PATH "${pkgs.coreutils}/bin:${pkgs.rspamd}/bin"
- done
- '';
- };
-
ldapConfig = pkgs.writeTextFile {
name = "dovecot-ldap.conf.ext.template";
@@ -109,7 +88,7 @@ let
# Prevent world-readable password files, even temporarily.
umask 077
- for f in ${builtins.toString (lib.mapAttrsToList (name: value: passwordFiles."${name}") cfg.loginAccounts)}; do
+ for f in ${builtins.toString (lib.mapAttrsToList (name: _: passwordFiles."${name}") cfg.loginAccounts)}; do
if [ ! -f "$f" ]; then
echo "Expected password hash file $f does not exist!"
exit 1
@@ -117,7 +96,7 @@ let
done
cat < ${passwdFile}
- ${lib.concatStringsSep "\n" (lib.mapAttrsToList (name: value:
+ ${lib.concatStringsSep "\n" (lib.mapAttrsToList (name: _:
"${name}:${"$(head -n 1 ${passwordFiles."${name}"})"}::::::"
) cfg.loginAccounts)}
EOF
@@ -130,7 +109,7 @@ let
EOF
'';
- junkMailboxes = builtins.attrNames (lib.filterAttrs (n: v: v ? "specialUse" && v.specialUse == "Junk") cfg.mailboxes);
+ junkMailboxes = builtins.attrNames (lib.filterAttrs (_: v: v ? "specialUse" && v.specialUse == "Junk") cfg.mailboxes);
junkMailboxNumber = builtins.length junkMailboxes;
# The assertion garantees there is exactly one Junk mailbox.
junkMailboxName = if junkMailboxNumber == 1 then builtins.elemAt junkMailboxes 0 else "";
diff --git a/mail-server/kresd.nix b/mail-server/kresd.nix
index e3baa07..230bdea 100644
--- a/mail-server/kresd.nix
+++ b/mail-server/kresd.nix
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
-{ config, pkgs, lib, ... }:
+{ config, lib, ... }:
let
cfg = config.mailserver;
diff --git a/mail-server/monit.nix b/mail-server/monit.nix
index c69b19e..c3f8760 100644
--- a/mail-server/monit.nix
+++ b/mail-server/monit.nix
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
-{ config, pkgs, lib, ... }:
+{ config, lib, ... }:
let
cfg = config.mailserver;
diff --git a/mail-server/postfix.nix b/mail-server/postfix.nix
index db3e581..d1c59b2 100644
--- a/mail-server/postfix.nix
+++ b/mail-server/postfix.nix
@@ -25,7 +25,7 @@ let
# Merge several lookup tables. A lookup table is a attribute set where
# - the key is an address (user@example.com) or a domain (@example.com)
# - the value is a list of addresses
- mergeLookupTables = tables: lib.zipAttrsWith (n: v: lib.flatten v) tables;
+ mergeLookupTables = tables: lib.zipAttrsWith (_: v: lib.flatten v) tables;
# valiases_postfix :: Map String [String]
valiases_postfix = mergeLookupTables (lib.flatten (lib.mapAttrsToList
@@ -123,13 +123,8 @@ let
/^Message-ID:\s+<(.*?)@.*?>/ REPLACE Message-ID: <$1@${cfg.fqdn}>
'');
- inetSocket = addr: port: "inet:[${toString port}@${addr}]";
- unixSocket = sock: "unix:${sock}";
-
smtpdMilters = [ "unix:/run/rspamd/rspamd-milter.sock" ];
- policyd-spf = pkgs.writeText "policyd-spf.conf" cfg.policydSPFExtraConfig;
-
mappedFile = name: "hash:/var/lib/postfix/conf/${name}";
mappedRegexFile = name: "pcre:/var/lib/postfix/conf/${name}";