summaryrefslogtreecommitdiff
path: root/staging/postfix/install
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-01-01 23:14:56 +0000
committerroot <root@rshg054.dnsready.net>2012-01-01 23:14:56 +0000
commit29f5aa692a3fa3ff3e743a47d1c57f1cc0341809 (patch)
tree862d365a74545cb3e7616d14e3b660aae977e6f8 /staging/postfix/install
parent8654516201466a2dd3f3f05a6c0095e69c01715c (diff)
Sun Jan 1 23:14:56 UTC 2012
Diffstat (limited to 'staging/postfix/install')
-rw-r--r--staging/postfix/install34
1 files changed, 34 insertions, 0 deletions
diff --git a/staging/postfix/install b/staging/postfix/install
new file mode 100644
index 000000000..c276e0919
--- /dev/null
+++ b/staging/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
+}