summaryrefslogtreecommitdiff
path: root/testing/postfix/install
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-10-25 23:14:56 +0000
committerroot <root@rshg054.dnsready.net>2011-10-25 23:14:56 +0000
commitd03e905f54857600b3c36af9b221c34ccb11074f (patch)
tree6456a06bc5bed5a6083f02bb468392dc6ba6337e /testing/postfix/install
parent0d7bab226067a44a9f1b978924e8201a3fa60764 (diff)
Tue Oct 25 23:14:56 UTC 2011
Diffstat (limited to 'testing/postfix/install')
-rw-r--r--testing/postfix/install34
1 files changed, 34 insertions, 0 deletions
diff --git a/testing/postfix/install b/testing/postfix/install
new file mode 100644
index 000000000..c276e0919
--- /dev/null
+++ b/testing/postfix/install
@@ -0,0 +1,34 @@
+post_install() {
+ getent group postdrop &>/dev/null || groupadd -g 75 postdrop >/dev/null
+ getent group postfix &>/dev/null || groupadd -g 73 postfix >/dev/null
+ getent passwd postfix &>/dev/null || useradd -u 73 -d /var/spool/postfix -g postfix -s /bin/false postfix >/dev/null
+
+ cd var/spool/postfix
+ chown postfix active bounce corrupt defer deferred flush hold incoming private public maildrop trace saved
+ chgrp postdrop public maildrop
+ cd ../../../usr/sbin
+ chgrp postdrop postqueue postdrop
+ chmod g+s postqueue postdrop
+ cd ../..
+ chown postfix var/lib/postfix
+
+ newaliases
+}
+
+post_upgrade() {
+ post_install
+
+ if [ `vercmp $2 2.8.3` = -1 ]; then cat <<EOF
+
+==> You must now execute "/etc/rc.d/postfix reload" (or restart).
+==> This is needed because of an inter-daemon protocol change.
+
+EOF
+ fi
+}
+
+pre_remove() {
+ getent passwd postfix &>/dev/null && userdel postfix >/dev/null
+ getent group postfix &>/dev/null && groupdel postfix >/dev/null
+ getent group postdrop &>/dev/null && groupdel postdrop >/dev/null
+}