[Dovecot] Remove Schaal, remove non-numeric TXT output from dig request
parent
6fae71ae22
commit
a02425dbf5
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
# Create temp directories
|
# Create temp directories
|
||||||
[[ ! -d /tmp/sa-rules-heinlein ]] && mkdir -p /tmp/sa-rules-heinlein
|
[[ ! -d /tmp/sa-rules-heinlein ]] && mkdir -p /tmp/sa-rules-heinlein
|
||||||
#[[ ! -d /tmp/sa-rules-schaal ]] && mkdir -p /tmp/sa-rules-schaal
|
|
||||||
|
|
||||||
# Hash current SA rules
|
# Hash current SA rules
|
||||||
if [[ ! -f /etc/rspamd/custom/sa-rules ]]; then
|
if [[ ! -f /etc/rspamd/custom/sa-rules ]]; then
|
||||||
|
@ -12,19 +11,11 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Deploy
|
# Deploy
|
||||||
## Heinlein
|
curl --connect-timeout 15 --retry 10 --max-time 30 http://www.spamassassin.heinlein-support.de/$(dig txt 1.4.3.spamassassin.heinlein-support.de +short | tr -d '"' | tr -dc '0-9').tar.gz --output /tmp/sa-rules-heinlein.tar.gz
|
||||||
curl --connect-timeout 15 --retry 10 --max-time 30 http://www.spamassassin.heinlein-support.de/$(dig txt 1.4.3.spamassassin.heinlein-support.de +short | tr -d '"').tar.gz --output /tmp/sa-rules-heinlein.tar.gz
|
|
||||||
if gzip -t /tmp/sa-rules-heinlein.tar.gz; then
|
if gzip -t /tmp/sa-rules-heinlein.tar.gz; then
|
||||||
tar xfvz /tmp/sa-rules-heinlein.tar.gz -C /tmp/sa-rules-heinlein
|
tar xfvz /tmp/sa-rules-heinlein.tar.gz -C /tmp/sa-rules-heinlein
|
||||||
cat /tmp/sa-rules-heinlein/*cf > /etc/rspamd/custom/sa-rules
|
cat /tmp/sa-rules-heinlein/*cf > /etc/rspamd/custom/sa-rules
|
||||||
fi
|
fi
|
||||||
## Schaal
|
|
||||||
#curl --connect-timeout 15 --max-time 30 http://sa.schaal-it.net/$(dig txt 1.4.3.sa.schaal-it.net +short | tr -d '"').tar.gz --output /tmp/sa-rules-schaal.tar.gz
|
|
||||||
#if gzip -t /tmp/sa-rules-schaal.tar.gz; then
|
|
||||||
# tar xfvz /tmp/sa-rules-schaal.tar.gz -C /tmp/sa-rules-schaal
|
|
||||||
# # Append, do not overwrite
|
|
||||||
# cat /tmp/sa-rules-schaal/*cf >> /etc/rspamd/custom/sa-rules
|
|
||||||
#fi
|
|
||||||
|
|
||||||
sed -i -e 's/\([^\\]\)\$\([^\/]\)/\1\\$\2/g' /etc/rspamd/custom/sa-rules
|
sed -i -e 's/\([^\\]\)\$\([^\/]\)/\1\\$\2/g' /etc/rspamd/custom/sa-rules
|
||||||
|
|
||||||
|
@ -40,4 +31,3 @@ fi
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
rm -rf /tmp/sa-rules-heinlein /tmp/sa-rules-heinlein.tar.gz
|
rm -rf /tmp/sa-rules-heinlein /tmp/sa-rules-heinlein.tar.gz
|
||||||
#rm -rf /tmp/sa-rules-schaal /tmp/sa-rules-schaal.tar.gz
|
|
||||||
|
|
Loading…
Reference in New Issue