From 47ef05ab310bb466300e93d1459370450414fbc4 Mon Sep 17 00:00:00 2001 From: "grm@eyesin.space" Date: Tue, 2 Sep 2025 23:04:24 +0000 Subject: init --- nixos/opensmtpd.nix | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 nixos/opensmtpd.nix (limited to 'nixos/opensmtpd.nix') diff --git a/nixos/opensmtpd.nix b/nixos/opensmtpd.nix new file mode 100644 index 0000000..57db251 --- /dev/null +++ b/nixos/opensmtpd.nix @@ -0,0 +1,35 @@ +{pkgs, ...}: { + environment = { + systemPackages = with pkgs; [ + mailutils + ]; + + etc."smtpd/aliases" = { + text = '' + root: manolis@netriin.net + abuse: root + noc: root + security: root + postmaster: root + hostmaster: root + webmaster: root + www: webmaster + ftp: root + ''; + mode = "0644"; + }; + }; + + services.opensmtpd = { + enable = true; + serverConfiguration = '' + listen on 0.0.0.0 + table aliases file:/etc/smtpd/aliases + action "local" maildir alias + action "relay" relay + match for local action "local" + match from local for any action "relay" + match from any for any action "relay" + ''; + }; +} -- cgit v1.2.3