summaryrefslogtreecommitdiff
path: root/network/milter-greylist/doinst.sh
diff options
context:
space:
mode:
authorDavid Woodfall <dave@dawoodfall.net>2014-11-07 07:23:25 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-11-08 06:30:13 +0700
commitbf29e8df503b47f8fe5ad897da637e31f9aa41d8 (patch)
tree900561226861a7877aa5b220046f89f971924b2d /network/milter-greylist/doinst.sh
parent9a734e78ad2215e3a05f386c23c48c9eceb5f1cf (diff)
downloadslackbuilds-bf29e8df503b47f8fe5ad897da637e31f9aa41d8.tar.gz
network/milter-greylist: Added (greylist filter).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/milter-greylist/doinst.sh')
-rw-r--r--network/milter-greylist/doinst.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/network/milter-greylist/doinst.sh b/network/milter-greylist/doinst.sh
new file mode 100644
index 0000000000..0d5a67743a
--- /dev/null
+++ b/network/milter-greylist/doinst.sh
@@ -0,0 +1,14 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/mail/greylist.conf.new