diff options
author | grm@eyesin.space <grm@eyesin.space> | 2025-09-02 23:04:24 +0000 |
---|---|---|
committer | grm@eyesin.space <grm@eyesin.space> | 2025-09-02 23:04:24 +0000 |
commit | 47ef05ab310bb466300e93d1459370450414fbc4 (patch) | |
tree | 808f155d2871f831af743509de982c4c9789357c /nixos/opensmtpd.nix | |
download | nixos-config-47ef05ab310bb466300e93d1459370450414fbc4.tar.gz nixos-config-47ef05ab310bb466300e93d1459370450414fbc4.tar.bz2 nixos-config-47ef05ab310bb466300e93d1459370450414fbc4.zip |
Diffstat (limited to 'nixos/opensmtpd.nix')
-rw-r--r-- | nixos/opensmtpd.nix | 35 |
1 files changed, 35 insertions, 0 deletions
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 <aliases> + action "relay" relay + match for local action "local" + match from local for any action "relay" + match from any for any action "relay" + ''; + }; +} |