add postmap
This commit is contained in:
parent
802fa4b9f1
commit
d6dd709476
1 changed files with 2 additions and 1 deletions
|
@ -6,9 +6,10 @@ rm /etc/postfix/allowed_clients
|
||||||
touch /etc/postfix/allowed_clients
|
touch /etc/postfix/allowed_clients
|
||||||
chown postfix.postfix /etc/postfix/allowed_clients
|
chown postfix.postfix /etc/postfix/allowed_clients
|
||||||
chmod o-rwx /etc/postfix/allowed_clients
|
chmod o-rwx /etc/postfix/allowed_clients
|
||||||
|
postmap /etc/postfix/allowed_clients
|
||||||
|
|
||||||
for client in "${clients[@]}"
|
for client in "${clients[@]}"
|
||||||
do
|
do
|
||||||
client_ip=$(dig "${client}" | grep -v '^;' |grep "\sA\s" | awk '{print($5)}')
|
client_ip=$(dig "${client}" | grep -v '^;' |grep "\sA\s" | awk '{print($5)}')
|
||||||
echo "${client_ip}" >> /etc/postfix/allowed_clients
|
echo "${client_ip}" >> /etc/postfix/allowed_clients
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue