From 7b1adb3806168f9139874ab869cf559ca141a10e Mon Sep 17 00:00:00 2001 From: Michael Kroes Date: Tue, 16 Jul 2019 17:03:04 +0200 Subject: [PATCH] Add custom whitelist --- conf/postgrey_whitelist_clients | 4 ++++ setup/mail-postfix.sh | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 conf/postgrey_whitelist_clients 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