feat: enable mail transport security policies
This commit is contained in:
parent
f9f75eb4cd
commit
c82a15b415
3 changed files with 27 additions and 3 deletions
|
|
@ -49,9 +49,13 @@
|
||||||
networking.hostName = "extremist-software";
|
networking.hostName = "extremist-software";
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
22
|
22
|
||||||
|
25
|
||||||
80
|
80
|
||||||
443
|
443
|
||||||
]; # SSH, HTTP, HTTPS
|
465
|
||||||
|
587
|
||||||
|
993
|
||||||
|
]; # SSH, SMTP, HTTP, HTTPS, SMTPS, Submission, IMAPS
|
||||||
# Tailscale
|
# Tailscale
|
||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
# We assume the user will authenticate manually or via a one-time key service
|
# We assume the user will authenticate manually or via a one-time key service
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,22 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"mta-sts.extremist.software" = {
|
||||||
|
extraConfig = ''
|
||||||
|
handle /.well-known/mta-sts.txt {
|
||||||
|
header Content-Type "text/plain"
|
||||||
|
respond `version: STSv1
|
||||||
|
mode: enforce
|
||||||
|
mx: mail.extremist.software
|
||||||
|
max_age: 604800
|
||||||
|
`
|
||||||
|
}
|
||||||
|
handle {
|
||||||
|
respond 404
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
"search.extremist.software" = {
|
"search.extremist.software" = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
rate_limit {
|
rate_limit {
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,7 @@
|
||||||
services.stalwart = {
|
services.stalwart = {
|
||||||
enable = true;
|
enable = true;
|
||||||
stateVersion = config.system.stateVersion;
|
stateVersion = config.system.stateVersion;
|
||||||
# Let stalwart open its own ports if needed for the main services
|
openFirewall = false;
|
||||||
openFirewall = true;
|
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
server = {
|
server = {
|
||||||
|
|
@ -24,6 +23,11 @@
|
||||||
protocol = "smtp";
|
protocol = "smtp";
|
||||||
tls.implicit = true;
|
tls.implicit = true;
|
||||||
};
|
};
|
||||||
|
submission = {
|
||||||
|
bind = "[::]:587";
|
||||||
|
protocol = "smtp";
|
||||||
|
tls.implicit = false;
|
||||||
|
};
|
||||||
imaps = {
|
imaps = {
|
||||||
bind = "[::]:993";
|
bind = "[::]:993";
|
||||||
protocol = "imap";
|
protocol = "imap";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue