diff --git a/setup/mail-postfix.sh b/setup/mail-postfix.sh index a554ed65..1efd5f66 100755 --- a/setup/mail-postfix.sh +++ b/setup/mail-postfix.sh @@ -225,9 +225,12 @@ if [ ! -f /etc/postgrey/whitelist_clients ] || find /etc/postgrey/whitelist_clie # curl manual states that --fail sometimes still produces output # this final check will at least check the output is not html # before moving it into place - if [ $( file -b --mime-type /tmp/postgrey_whitelist_clients) == "text/plain" ]; then + if [ \$( file -b --mime-type /tmp/postgrey_whitelist_clients) == "text/plain" ]; then mv /tmp/postgrey_whitelist_clients /etc/postgrey/whitelist_clients + else + rm /tmp/postgrey_whitelist_clients fi + fi fi EOF