Update postgrey deployment
This commit is contained in:
parent
c8ce0a276c
commit
1a47f13713
2 changed files with 14 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -6,8 +6,17 @@
|
|||
group: root
|
||||
mode: 0755
|
||||
|
||||
- name: Mise à jour des whitelist de postgrey via crontab
|
||||
cron:
|
||||
name: update_postgrey_whitelist
|
||||
minute: "1"
|
||||
hour: "0"
|
||||
user: root
|
||||
job: "/usr/local/sbin/update_postgrey_whitelist.sh"
|
||||
cron_file: update_postgrey_whitelist
|
||||
|
||||
- name: Enable postgrey at boot time
|
||||
service:
|
||||
name: postgrey
|
||||
enabled: yes
|
||||
enabled: true
|
||||
state: started
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue