PREIN
/bin/sh
/usr/share/rpm-helper/add-user bincimap $1 bincimap /var/lib/bincimap-chroot /bin/false
POSTIN
/bin/sh
if [ $1 = "1" ]; then
#Create a self-signed server key and certificate
#The script checks first if they exists, if yes, it exits,
#otherwise, it creates them.
if ! [ -f /etc/ssl/bincimap/bincimap.pem ];then
sh /usr/share/doc/bincimap-1.2.13/mkimapdcert >/dev/null
fi
fi
service xinetd condrestart
POSTUN
/bin/sh
/usr/share/rpm-helper/del-user bincimap $1 bincimap
service xinetd condrestart