From 87361907435aa40175c5e46dd98a05ad6bd8c7eb Mon Sep 17 00:00:00 2001 From: Siva Mahadevan Date: Fri, 3 Jul 2020 15:14:25 -0400 Subject: [PATCH] neomutt: Add SMTP port to smtp_url --- modules/programs/neomutt.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/programs/neomutt.nix b/modules/programs/neomutt.nix index 2cc7bc6e2..9a0f0113d 100644 --- a/modules/programs/neomutt.nix +++ b/modules/programs/neomutt.nix @@ -111,7 +111,9 @@ let } else let smtpProto = if smtp.tls.enable then "smtps" else "smtp"; - smtpBaseUrl = "${smtpProto}://${escape userName}@${smtp.host}"; + smtpPort = if smtp.port != null then ":${smtp.port}" else ""; + smtpBaseUrl = + "${smtpProto}://${escape userName}@${smtp.host}${smtpPort}"; in { smtp_url = "'${smtpBaseUrl}'"; smtp_pass = "'`${passCmd}`'";