From 6275d1fc57d3c149691cddba0809ef040dfa7843 Mon Sep 17 00:00:00 2001 From: Benedikt Rips Date: Mon, 4 Aug 2025 13:12:55 +0200 Subject: [PATCH] accounts.email: add 'davmail' flavor --- modules/accounts/email.nix | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/modules/accounts/email.nix b/modules/accounts/email.nix index b6e57561e..97404d1d6 100644 --- a/modules/accounts/email.nix +++ b/modules/accounts/email.nix @@ -355,13 +355,14 @@ let flavor = mkOption { type = types.enum [ - "plain" - "gmail.com" - "runbox.com" + "davmail" "fastmail.com" - "yandex.com" - "outlook.office365.com" + "gmail.com" "migadu.com" + "outlook.office365.com" + "plain" + "runbox.com" + "yandex.com" ]; default = "plain"; description = '' @@ -618,6 +619,20 @@ let port = if config.smtp.tls.useStartTls then 587 else 465; }; }) + + (mkIf (config.flavor == "davmail") { + imap = { + host = "localhost"; + port = 1143; + authentication = "login"; + }; + smtp = { + host = "localhost"; + port = 1025; + tls.enable = false; + authentication = "plain"; + }; + }) ]; };