Fix mailinabox-postgrey-whitelist cron job return code for file over 28 days

Merges #1639
This commit is contained in:
Jeff Volkenant 2019-09-06 12:59:30 -07:00 committed by Joshua Tauberer
parent 70f05e9d52
commit 24a567c3be
2 changed files with 5 additions and 1 deletions

View file

@ -8,6 +8,10 @@ Software updates:
* Upgraded Nextcloud from 15.0.8 to 16.0.5 (with Contacts from 3.1.1 to 3.1.4 and Calendar from 1.6.5 to 1.7.1) * Upgraded Nextcloud from 15.0.8 to 16.0.5 (with Contacts from 3.1.1 to 3.1.4 and Calendar from 1.6.5 to 1.7.1)
Mail:
* Fetching of updated whitelist for greylisting was fetching each day instead of every month.
v0.43 (September 1, 2019) v0.43 (September 1, 2019)
------------------------- -------------------------

View file

@ -218,7 +218,7 @@ cat > /etc/cron.daily/mailinabox-postgrey-whitelist << EOF;
# Mail-in-a-Box # Mail-in-a-Box
# check we have a postgrey_whitelist_clients file and that it is not older than 28 days # check we have a postgrey_whitelist_clients file and that it is not older than 28 days
if [ ! -f /etc/postgrey/whitelist_clients ] || find /etc/postgrey/whitelist_clients -mtime +28 > /dev/null ; then if [ ! -f /etc/postgrey/whitelist_clients ] || find /etc/postgrey/whitelist_clients -mtime +28 | grep -q '.' ; then
# ok we need to update the file, so lets try to fetch it # ok we need to update the file, so lets try to fetch it
if curl https://postgrey.schweikert.ch/pub/postgrey_whitelist_clients --output /tmp/postgrey_whitelist_clients -sS --fail > /dev/null 2>&1 ; then if curl https://postgrey.schweikert.ch/pub/postgrey_whitelist_clients --output /tmp/postgrey_whitelist_clients -sS --fail > /dev/null 2>&1 ; then
# if fetching hasn't failed yet then check it is a plain text file # if fetching hasn't failed yet then check it is a plain text file