My Nix Configuration

[prefect] allow port 25

pyrox.dev fa59dbe3 68f8cc8f

verified
Changed files
+23 -3
systems
x86_64-linux
prefect
services
mailserver
+1
systems/x86_64-linux/prefect/firewall.nix
···
networking.firewall = {
enable = true;
allowedTCPPorts = [
+
25
80
143
179
+1 -1
systems/x86_64-linux/prefect/services/mailserver/stalwart/auth.nix
···
{ ifThen, otherwise }:
let
relVer = [
-
(ifThen "listener = 'smtp'" "relaxed")
+
(ifThen "protocol = 'smtp'" "relaxed")
(otherwise "disable")
];
in
+1 -1
systems/x86_64-linux/prefect/services/mailserver/stalwart/default.nix
···
# https://stalw.art/docs/email/maintenance
email.auto-expunge = "180d";
changes.max-history = 10000;
-
session = import ./session.nix { inherit isAuthenticated otherwise; };
+
session = import ./session.nix { inherit isAuthenticated otherwise ifThen; };
queue = import ./queue.nix { inherit d ifThen otherwise; };
# DNS Settings
# https://stalw.art/docs/mta/outbound/dns
+20 -1
systems/x86_64-linux/prefect/services/mailserver/stalwart/session.nix
···
-
{ isAuthenticated, otherwise }:
+
{
+
isAuthenticated,
+
otherwise,
+
ifThen,
+
}:
# MTA Settings
# https://stalw.art/docs/mta/overview
{
···
# # https://stalw.art/docs/mta/inbound/ehlo
ehlo = {
require = true;
+
reject-non-fqdn = [
+
(ifThen "protocol = 'smtp'" true)
+
(otherwise false)
+
];
};
# # RCPT Stage
# # https://stalw.art/docs/mta/inbound/rcpt
···
(otherwise false)
];
subaddressing = true;
+
};
+
auth = {
+
mechanisms = [
+
(ifThen "protocol != 'smtp'" "[plain, login]")
+
(otherwise false)
+
];
+
directory = "'default'";
+
require = [
+
(ifThen "protocol != 'smtp'" true)
+
(otherwise false)
+
];
};
extensions =
let