about summary refs log tree commit diff
path: root/modules/services/mail
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2012-09-24 07:31:04 -0700
committerPeter Simons <simons@cryp.to>2012-09-24 07:31:04 -0700
commitc1949c36e90000f0a32007b70fb4df8bc607cf3a (patch)
tree88e9ac13958557b84cccb9c2c9df963b84e4ce32 /modules/services/mail
parent5ee79c57228cda29883dd61fd75dc4e5c05ea7b6 (diff)
parentb8f09be5e0ad79e552e3715565851cb5b34579e9 (diff)
downloadnixlib-c1949c36e90000f0a32007b70fb4df8bc607cf3a.tar
nixlib-c1949c36e90000f0a32007b70fb4df8bc607cf3a.tar.gz
nixlib-c1949c36e90000f0a32007b70fb4df8bc607cf3a.tar.bz2
nixlib-c1949c36e90000f0a32007b70fb4df8bc607cf3a.tar.lz
nixlib-c1949c36e90000f0a32007b70fb4df8bc607cf3a.tar.xz
nixlib-c1949c36e90000f0a32007b70fb4df8bc607cf3a.tar.zst
nixlib-c1949c36e90000f0a32007b70fb4df8bc607cf3a.zip
Merge pull request #31 from peti/master
Drop service for dovecot 1.x.
Diffstat (limited to 'modules/services/mail')
-rw-r--r--modules/services/mail/dovecot.nix130
1 files changed, 0 insertions, 130 deletions
diff --git a/modules/services/mail/dovecot.nix b/modules/services/mail/dovecot.nix
deleted file mode 100644
index ff41c8f43025..000000000000
--- a/modules/services/mail/dovecot.nix
+++ /dev/null
@@ -1,130 +0,0 @@
-{ config, pkgs, ... }:
-
-with pkgs.lib;
-
-let
-
-  cfg = config.services.dovecot;
-
-  dovecotConf =
-    ''
-      base_dir = /var/run/dovecot/
-
-      protocols = imap imaps pop3 pop3s
-    ''
-    + (if cfg.sslServerCert!="" then
-    ''
-      ssl_cert_file = ${cfg.sslServerCert}
-      ssl_key_file = ${cfg.sslServerKey}
-      ssl_ca_file = ${cfg.sslCACert}
-    '' else ''
-      ssl_disable = yes
-      disable_plaintext_auth = no
-    '')
-
-    + ''
-      login_user = ${cfg.user}
-      login_chroot = no
-
-      mail_location = maildir:/var/spool/mail/%u
-
-      maildir_copy_with_hardlinks = yes
-
-      auth default {
-        mechanisms = plain login
-        userdb passwd {
-        }
-        passdb pam {
-        }
-        user = root
-      }
-      auth_debug = yes
-      auth_verbose = yes
-
-      pop3_uidl_format = %08Xv%08Xu
-
-      log_path = /var/log/dovecot.log
-    '';
-
-  confFile = pkgs.writeText "dovecot.conf" dovecotConf;
-
-in
-
-{
-
-  ###### interface
-
-  options = {
-
-    services.dovecot = {
-
-      enable = mkOption {
-        default = false;
-        description = "Whether to enable the Dovecot POP3/IMAP server.";
-      };
-
-      user = mkOption {
-        default = "dovecot";
-        description = "Dovecot user name.";
-      };
-
-      group = mkOption {
-        default = "dovecot";
-        description = "Dovecot group name.";
-      };
-
-      sslServerCert = mkOption {
-        default = "";
-        description = "Server certificate";
-      };
-
-      sslCACert = mkOption {
-        default = "";
-        description = "CA certificate used by the server certificate.";
-      };
-
-      sslServerKey = mkOption {
-        default = "";
-        description = "Server key.";
-      };
-
-    };
-
-  };
-
-
-  ###### implementation
-
-  config = mkIf config.services.dovecot.enable {
-
-    security.pam.services = [ { name = "dovecot"; } ];
-
-    users.extraUsers = singleton
-      { name = cfg.user;
-        uid = config.ids.uids.dovecot;
-        description = "Dovecot user";
-        group = cfg.group;
-      };
-
-    users.extraGroups = singleton
-      { name = cfg.group;
-        gid = config.ids.gids.dovecot;
-      };
-
-    jobs.dovecot =
-      { description = "Dovecot IMAP/POP3 server";
-
-        startOn = "started networking";
-
-        preStart =
-          ''
-            ${pkgs.coreutils}/bin/mkdir -p /var/run/dovecot /var/run/dovecot/login
-            ${pkgs.coreutils}/bin/chown -R ${cfg.user}:${cfg.group} /var/run/dovecot
-          '';
-
-        exec = "${pkgs.dovecot}/sbin/dovecot -F -c ${confFile}";
-      };
-
-  };
-
-}