From c7d5358dcefba6f02c7edcdb700718cf1e1e04e6 Mon Sep 17 00:00:00 2001 From: James Tomasino Date: Fri, 18 Sep 2020 16:05:20 +0000 Subject: [PATCH] adding access restrictions that match transport to limit where mail can come from --- Makefile | 2 ++ postfix/access | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 postfix/access diff --git a/Makefile b/Makefile index cdf4f80..d91e3b5 100644 --- a/Makefile +++ b/Makefile @@ -55,10 +55,12 @@ menu: postfix: if ! grep -q 'transport_maps' "/etc/postfix/main.cf"; then \ printf "transport_maps = hash:/etc/postfix/transport" >> "/etc/postfix/main.cf"; \ + printf "smtpd_sender_restrictions = hash:/etc/postfix/access" >> "/etc/postfix/main.cf"; \ fi stow -t "/etc/postfix" postfix sudo chown root /etc/postfix/transport postmap /etc/postfix/transport + postmap /etc/postfix/access postfix reload uninstall: diff --git a/postfix/access b/postfix/access new file mode 100644 index 0000000..7872a96 --- /dev/null +++ b/postfix/access @@ -0,0 +1,42 @@ +cosmic.voyage ALLOW +.aussies.space ALLOW +.circumlunar.space ALLOW +.hashbang.sh ALLOW +.thunix.cf ALLOW +.thunix.net ALLOW +.tildeverse.org ALLOW +aussies.space ALLOW +circumlunar.space ALLOW +ctrl-c.club ALLOW +envs.net ALLOW +radiofreqs.space ALLOW +rw.rs ALLOW +fuckup.club ALLOW +grex.org ALLOW +hashbang.sh ALLOW +nand.sh ALLOW +rawtext.club ALLOW +sdf.org ALLOW +thunix.cf ALLOW +thunix.net ALLOW +tild3.org ALLOW +tilde.chat ALLOW +tilde.club ALLOW +tilde.institute ALLOW +tilde.life ALLOW +tilde.news ALLOW +tilde.pink ALLOW +tilde.site ALLOW +tilde.team ALLOW +tilde.town ALLOW +tilde.wiki ALLOW +tilde.wtf ALLOW +tilde.zone ALLOW +tildegit.org ALLOW +tildenet.org ALLOW +tilderadio.org ALLOW +tildeteam.org ALLOW +tildeverse.org ALLOW +ttm.sh ALLOW +yourtilde.com ALLOW +* REJECT