hash properly allowed hosts
This commit is contained in:
parent
d6dd709476
commit
38a8b3cddd
2 changed files with 2 additions and 2 deletions
|
@ -50,7 +50,7 @@ postfix_config:
|
|||
mailbox_size_limit: 0
|
||||
mydestination: "{{ mail_server_fqdn }}; localhost; localhost.localdomain"
|
||||
myhostname: "{{ mail_server_fqdn }}"
|
||||
mynetworks: "127.0.0.0/8 /etc/postfix/allowed_clients{% if mail_own_networks %}{% for ip in mail_own_networks %} {{ ip }}{% endfor %}{% endif %}"
|
||||
mynetworks: "127.0.0.0/8 hash:/etc/postfix/allowed_clients{% if mail_own_networks %}{% for ip in mail_own_networks %} {{ ip }}{% endfor %}{% endif %}"
|
||||
myorigin: /etc/mailname
|
||||
policy-spf_time_limit: 3600s
|
||||
proxy_read_maps: $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
|
||||
|
|
|
@ -11,5 +11,5 @@ postmap /etc/postfix/allowed_clients
|
|||
for client in "${clients[@]}"
|
||||
do
|
||||
client_ip=$(dig "${client}" | grep -v '^;' |grep "\sA\s" | awk '{print($5)}')
|
||||
echo "${client_ip}" >> /etc/postfix/allowed_clients
|
||||
echo "${client_ip} OK" >> /etc/postfix/allowed_clients
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue