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;
|
useDHCP = false;
|
||||||
firewall = {
|
firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowedTCPPorts = [ 25 ];
|
allowedTCPPorts = [ 25 80 ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -3,5 +3,6 @@
|
||||||
imports = [
|
imports = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
./postfix.nix
|
./postfix.nix
|
||||||
|
./acme.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ ... }: {
|
{ config, ... }:
|
||||||
|
{
|
||||||
# Postfix relay configuration, see: https://www.postfix.org/STANDARD_CONFIGURATION_README.html#backup
|
# Postfix relay configuration, see: https://www.postfix.org/STANDARD_CONFIGURATION_README.html#backup
|
||||||
services.postfix = {
|
services.postfix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -7,6 +8,8 @@
|
||||||
"grzb.de"
|
"grzb.de"
|
||||||
"nekover.se"
|
"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 = ''
|
extraConfig = ''
|
||||||
message_size_limit = 20971520
|
message_size_limit = 20971520
|
||||||
smtpd_relay_restrictions = permit_mynetworks reject_unauth_destination
|
smtpd_relay_restrictions = permit_mynetworks reject_unauth_destination
|
||||||
|
|
Loading…
Reference in a new issue