]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/mail/postfix.nix
Add 465 port for mail submission
[perso/Immae/Config/Nix.git] / modules / private / mail / postfix.nix
index dfe6129af9ef847db361a819a69ec8b96f833388..ee4ac35159e09da2b057f168fc9a862514d97e88 100644 (file)
@@ -77,7 +77,7 @@
     }
   ];
 
-  config.networking.firewall.allowedTCPPorts = [ 25 587 ];
+  config.networking.firewall.allowedTCPPorts = [ 25 465 587 ];
 
   config.nixpkgs.overlays = [ (self: super: {
     postfix = super.postfix.override { withMySQL = true; };
     sslKey = "/var/lib/acme/mail/key.pem";
     recipientDelimiter = "+";
     masterConfig = {
+      submissions = {
+        type = "inet";
+        private = false;
+        command = "smtpd";
+        args = ["-o" "smtpd_tls_wrappermode=yes" ] ++ (let
+          mkKeyVal = opt: val: [ "-o" (opt + "=" + val) ];
+        in lib.concatLists (lib.mapAttrsToList mkKeyVal config.services.postfix.submissionOptions)
+        );
+      };
       dovecot = {
         type = "unix";
         privileged = true;