diff options
author | root <root@rshg054.dnsready.net> | 2012-04-08 00:02:42 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-04-08 00:02:42 +0000 |
commit | 37e364f033ed6db243d6db524075d8c5394c90f9 (patch) | |
tree | db3bb1bc5749bee5a51cb403c0b944b52cb10fc3 /testing/postfix/install | |
parent | 2317ee13e2342fd8b81ffaf3a427fd4bb096ec28 (diff) |
Sun Apr 8 00:02:42 UTC 2012
Diffstat (limited to 'testing/postfix/install')
-rw-r--r-- | testing/postfix/install | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/testing/postfix/install b/testing/postfix/install new file mode 100644 index 000000000..cb97e2e6c --- /dev/null +++ b/testing/postfix/install @@ -0,0 +1,33 @@ +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.9.0` = -1 ]; then cat <<EOF + +==> You must now run "postfix reload" due to 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 +} |