diff --git a/install_postfix_advanced.sh b/install_postfix_advanced.sh index 53b1cc7..34e446d 100755 --- a/install_postfix_advanced.sh +++ b/install_postfix_advanced.sh @@ -1582,6 +1582,8 @@ mynetworks = #162.55.82.73 # d.mx.oopen.de #95.217.204.227/32 + # e.mx.oopen.de + #95.217.204.205/32 smtp_bind_address = $IPV4 #smtp_bind_address6 = $IPV6 @@ -2472,6 +2474,7 @@ smtpd_relay_restrictions = # only special accounts (postmaster, abuse and other rolr accounts) check_recipient_access btree:/etc/postfix/access_recipient-rfc, # White- / Blacklisting + check_client_access btree:/etc/postfix/client_allow_relay, check_sender_access btree:/etc/postfix/access_sender, check_recipient_access btree:/etc/postfix/access_recipient, # permit trusted network (mynetwork) @@ -2813,6 +2816,31 @@ else echo_failed fi +echononl " Create file \"client_allow_relay\"" +if [[ ! -f "/etc/postfix/client_allow_relay" ]]; then + cat < /etc/postfix/client_allow_relay +# /etc/postfix/client_allow_relay +# +# Restricts which clients (IP addresses or hostnames) this system accepts +# (or rejects) for relaying e-mails +# +# Example: +# b.mx.oopen.de OK + +#lists.mx.warenform.de OK + +#b.mx.oopen.de OK +#d.mx.oopen.de OK + +EOF +fi +postmap btree:/etc/postfix/client_allow_relay +if [[ $? -eq 0 ]] ; then + echo_ok +else + echo_failed +fi + echononl " Create file \"sender_canonical\"" if [[ ! -f /etc/postfix/sender_canonical ]]; then cat < /etc/postfix/sender_canonical