adding access restrictions that match transport to limit where mail can come from

This commit is contained in:
James Tomasino 2020-09-18 16:05:20 +00:00
parent 3369017c5a
commit c7d5358dce
2 changed files with 44 additions and 0 deletions

View File

@ -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:

42
postfix/access Normal file
View File

@ -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