Enable TLS on mail relay
This commit is contained in:
parent
91bd9f3c1d
commit
9815afffdb
9
config/hosts/mail-2/acme.nix
Normal file
9
config/hosts/mail-2/acme.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ ... }:
|
||||
{
|
||||
security.acme.certs = {
|
||||
"mail-2.grzb.de" = {
|
||||
listenHTTP = ":80";
|
||||
reloadServices = [ "postfix.service" ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -79,7 +79,7 @@
|
|||
useDHCP = false;
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 25 ];
|
||||
allowedTCPPorts = [ 25 80 ];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -3,5 +3,6 @@
|
|||
imports = [
|
||||
./configuration.nix
|
||||
./postfix.nix
|
||||
./acme.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{ ... }: {
|
||||
{ config, ... }:
|
||||
{
|
||||
# Postfix relay configuration, see: https://www.postfix.org/STANDARD_CONFIGURATION_README.html#backup
|
||||
services.postfix = {
|
||||
enable = true;
|
||||
|
@ -7,6 +8,8 @@
|
|||
"grzb.de"
|
||||
"nekover.se"
|
||||
];
|
||||
sslCert = "${config.security.acme.certs."mail-2.grzb.de".directory}/fullchain.pem";
|
||||
sslKey = "${config.security.acme.certs."mail-2.grzb.de".directory}/key.pem";
|
||||
extraConfig = ''
|
||||
message_size_limit = 20971520
|
||||
smtpd_relay_restrictions = permit_mynetworks reject_unauth_destination
|
||||
|
|
Loading…
Reference in a new issue