diff options
author | root <root@rshg047.dnsready.net> | 2011-06-20 23:03:55 +0000 |
---|---|---|
committer | root <root@rshg047.dnsready.net> | 2011-06-20 23:03:55 +0000 |
commit | f02c28de0bbcb85e152fc19d0008805021fe1a33 (patch) | |
tree | 0cb0a135fbbb06d2e31fe64ff2caad474dcc3813 /staging/postfix/install | |
parent | 5457eacc747fc3f91e10a1f452230b1feac39eff (diff) |
Mon Jun 20 23:03:54 UTC 2011
Diffstat (limited to 'staging/postfix/install')
-rw-r--r-- | staging/postfix/install | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/staging/postfix/install b/staging/postfix/install new file mode 100644 index 000000000..f5d81a565 --- /dev/null +++ b/staging/postfix/install @@ -0,0 +1,35 @@ +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` = -1 ]; then cat <<EOF + +==> You must now execute "/etc/rc.d/postfix reload" (or restart). +==> This is needed because the queue manager to delivery agent +==> protocol has changed. + +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 +} |