postfix: minor modifs spamp.sh
This commit is contained in:
parent
8e99b9fcb8
commit
e6ef4396f3
|
@ -25,7 +25,7 @@ function is_new {
|
||||||
function download {
|
function download {
|
||||||
cd "${tmp_dir}"
|
cd "${tmp_dir}"
|
||||||
wget -q -t 3 "${data_url}/${1}" -O "${1}"
|
wget -q -t 3 "${data_url}/${1}" -O "${1}"
|
||||||
wget -q -t 3 "${data_url}/${1}.md5" -O "${1}.md5"
|
wget -q -t 3 "${data_url}/${1}.md5" -O "${1}.md5"
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_integrity {
|
function check_integrity {
|
||||||
|
@ -39,6 +39,7 @@ function cleanup {
|
||||||
rm -f "$tmp_dir"/*.md5.new
|
rm -f "$tmp_dir"/*.md5.new
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Postfix
|
||||||
postfix_dbs="client.access sender.access recipient.access header_kill sa-blacklist.access spamd.cidr"
|
postfix_dbs="client.access sender.access recipient.access header_kill sa-blacklist.access spamd.cidr"
|
||||||
for db in ${postfix_dbs}; do
|
for db in ${postfix_dbs}; do
|
||||||
if is_new "${db}"; then
|
if is_new "${db}"; then
|
||||||
|
@ -61,7 +62,7 @@ if is_installed spamassassin; then
|
||||||
if is_new "${sa_db}"; then
|
if is_new "${sa_db}"; then
|
||||||
download "${sa_db}"
|
download "${sa_db}"
|
||||||
if check_integrity "${sa_db}"; then
|
if check_integrity "${sa_db}"; then
|
||||||
cp ${tmp_dir}/evolix_rules.cf /etc/spamassassin
|
cp "${tmp_dir}/${sa_db}" /etc/spamassassin/
|
||||||
/etc/init.d/spamassassin reload > /dev/null
|
/etc/init.d/spamassassin reload > /dev/null
|
||||||
if [ -d /etc/spamassassin/sa-update-hooks.d ]; then
|
if [ -d /etc/spamassassin/sa-update-hooks.d ]; then
|
||||||
run-parts --lsbsysinit /etc/spamassassin/sa-update-hooks.d
|
run-parts --lsbsysinit /etc/spamassassin/sa-update-hooks.d
|
||||||
|
|
Loading…
Reference in a new issue