diff --git a/conf/postgrey_whitelist_clients b/conf/postgrey_whitelist_clients new file mode 100644 index 00000000..8a928645 --- /dev/null +++ b/conf/postgrey_whitelist_clients @@ -0,0 +1,4 @@ +/^mailgwgb\d+\.rightnowtech\.com$/ +/^mx-\d+\.reddit\.com$/ +/^mta-aws\d+\.sanomacorp\.net$/ +/^mail.*\.mandrillapp\.com$/ diff --git a/setup/mail-postfix.sh b/setup/mail-postfix.sh index a554ed65..c1a43c9b 100755 --- a/setup/mail-postfix.sh +++ b/setup/mail-postfix.sh @@ -225,8 +225,9 @@ 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 + cat /root/mailinabox/conf/postgrey_whitelist_clients >> /etc/postgrey/whitelist_clients fi fi fi