diff --git a/etc/postfix-clearnet/main.cf b/etc/postfix-clearnet/main.cf index c103fd6..a5666e9 100644 --- a/etc/postfix-clearnet/main.cf +++ b/etc/postfix-clearnet/main.cf @@ -16,9 +16,10 @@ default_transport = relay relayhost = [10.8.0.1] inet_interfaces = 127.0.0.1 smtp_sasl_auth_enable=yes -smtp_sasl_password_maps = static:MY_USER:MY_PASSWORD +smtp_sasl_password_maps = hash:/etc/postfix-clearnet/sasl_password smtp_sasl_security_options = noanonymous mynetworks_style = host ignore_mx_lookup_error = yes canonical_maps = regexp:/etc/postfix-clearnet/canonical smtp_generic_maps = regexp:/etc/postfix-clearnet/canonical +transport_maps = hash:/etc/postfix-clearnet/transport diff --git a/etc/postfix-clearnet/sasl_password b/etc/postfix-clearnet/sasl_password new file mode 100644 index 0000000..52d0439 --- /dev/null +++ b/etc/postfix-clearnet/sasl_password @@ -0,0 +1 @@ +[10.8.0.1] MY_USER:MY_PASSWORD diff --git a/etc/postfix-clearnet/transport b/etc/postfix-clearnet/transport new file mode 100644 index 0000000..409ff14 --- /dev/null +++ b/etc/postfix-clearnet/transport @@ -0,0 +1,2 @@ +hosting.danwin1210.me relay:[127.0.0.2] +* relay:[10.8.0.1] diff --git a/etc/rc.local b/etc/rc.local index cb35cac..6e1dcff 100755 --- a/etc/rc.local +++ b/etc/rc.local @@ -33,7 +33,7 @@ iptables -t nat -A OUTPUT -p udp --dport 123 -d $clearnet -j RETURN; iptables -A OUTPUT -p udp --dport 123 -d $clearnet -j ACCEPT )done #unrestricted access to these IPs -for clearnet in 127.0.0.1; do( +for clearnet in 127.0.0.0/8; do( iptables -t nat -A OUTPUT -d $clearnet -j RETURN; iptables -A OUTPUT -d $clearnet -j ACCEPT; ) done