Update postgrey deployment

This commit is contained in:
Adrien Reslinger 2022-07-16 12:53:09 +02:00
parent c8ce0a276c
commit 1a47f13713
Signed by: adrien
GPG key ID: DA7B27055C66D6DE
2 changed files with 14 additions and 4 deletions

View file

@ -1,7 +1,8 @@
#!/bin/bash
wget https://github.com/schweikert/postgrey/raw/master/postgrey_whitelist_clients
curl -L https://github.com/schweikert/postgrey/raw/master/postgrey_whitelist_clients -o /dev/shm/postgrey_whitelist_clients
#wget https://github.com/schweikert/postgrey/raw/master/postgrey_whitelist_recipients
sed -e 's|##DATE##|'"$(date +%d/%m/%Y)"'|' -e 's|##VERSION##|master|' -i postgrey_whitelist_clients
cat postgrey_whitelist_clients > /etc/postfix/postgrey_whitelist_clients
sed -e 's|##DATE##|'"$(date +%d/%m/%Y)"'|' -e 's|##VERSION##|master|' -i /dev/shm/postgrey_whitelist_clients
cat /dev/shm/postgrey_whitelist_clients > /etc/postfix/postgrey_whitelist_clients
rm -f /dev/shm/postgrey_whitelist_clients
systemctl restart postgrey