post_install() {
	getent group postfwd  &>/dev/null || groupadd -g 180 postfwd  >/dev/null
	getent passwd postfwd &>/dev/null || useradd -u 180 -d /var/empty -g postfwd -s /bin/false postfwd >/dev/null
	true
}

post_upgrade() {
	if  [ "$(vercmp $2 1.35-2)" -lt 0 ]; then
		echo 'The config file moved to /etc/postfwd/postfwd.cf and postfwd will'
		echo 'run under the postfwd user. Please make sure to adjust your setup.'
	fi
}

pre_remove() {
	getent passwd postfwd &>/dev/null && userdel  postfwd  >/dev/null
	getent group postfwd  &>/dev/null && groupdel postfwd  >/dev/null
	true
}
