}
];
- config.networking.firewall.allowedTCPPorts = [ 25 587 ];
+ config.networking.firewall.allowedTCPPorts = [ 25 465 587 ];
config.nixpkgs.overlays = [ (self: super: {
postfix = super.postfix.override { withMySQL = true; };
milter_macro_daemon_name = "ORIGINATING";
smtpd_milters = "unix:${config.myServices.mail.milters.sockets.opendkim}";
};
+ # FIXME: Mail adressed to localhost.immae.eu will still have mx-1 as
+ # prioritized MX, which provokes "mail for localhost.immae.eu loops
+ # back to myself" errors. This transport entry forces to push
+ # e-mails to its right destination.
+ transport = ''
+ localhost.immae.eu smtp:[immae.eu]:25
+ '';
destination = ["localhost"];
# This needs to reverse DNS
hostname = "eldiron.immae.eu";
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;