Compare commits

...

2 commits

Author SHA1 Message Date
264d64526c allow sending email through postfix 2025-03-09 22:58:39 -04:00
a88c13b4f6 add telnet to packages 2025-03-09 22:58:15 -04:00
2 changed files with 6 additions and 2 deletions

View file

@ -43,6 +43,7 @@
less
killall
screen
inetutils
];
users.users.jaina = {

View file

@ -3,8 +3,11 @@
{
networking.firewall.extraCommands = let user = config.services.postfix.user;
in ''
iptables -I OUTPUT -m owner ! --uid-owner ${user} -m tcp -p tcp --dport 25 -j REJECT --reject-with icmp-admin-prohibited
ip6tables -I OUTPUT -m owner ! --uid-owner ${user} -m tcp -p tcp --dport 25 -j REJECT --reject-with icmp6-adm-prohibited
iptables -A OUTPUT -m owner ! --uid-owner ${user} -m tcp -p tcp --dport 25 -j REJECT --reject-with icmp-admin-prohibited
ip6tables -A OUTPUT -m owner ! --uid-owner ${user} -m tcp -p tcp --dport 25 -j REJECT --reject-with icmp6-adm-prohibited
iptables -I OUTPUT -m tcp -p tcp --dport 25 -d 127.0.0.1 -j ACCEPT
ip6tables -I OUTPUT -m tcp -p tcp --dport 25 -d 127.0.0.1 -j ACCEPT
'';
services.postfix = {