allow sending email through postfix
This commit is contained in:
parent
a88c13b4f6
commit
264d64526c
1 changed files with 5 additions and 2 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue