summaryrefslogtreecommitdiff
path: root/extra/postfix/install
blob: 7230359fc27c67c60aad6a9241e94357b29132f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
post_upgrade() {
	/usr/lib/postfix/post-install daemon_directory=/usr/lib/postfix upgrade-package
	chown postfix var/lib/postfix
}

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
	post_upgrade
}

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
	true
}