POSTIN
/bin/sh
# If no cert, migrate stunnel.pem, or generate a new cert
pushd /etc/ssl/imap &> /dev/null || :
for CERT in imapsd.pem ipop3sd.pem ;do
if [ ! -e $CERT ];then
if [ -e stunnel.pem ];then
cp stunnel.pem $CERT &> /dev/null || :
elif [ -e Makefile.imap ];then
make -f Makefile.imap $CERT << EOF &> /dev/null || :
--
SomeState
SomeCity
SomeOrganization
SomeOrganizationalUnit
localhost.localdomain
root@localhost.localdomain
EOF
fi
fi
done
popd &> /dev/null || :
[ -x /etc/init.d/xinetd ] && /etc/init.d/xinetd condrestart 2>/dev/null >/dev/null
exit 0
POSTUN
/bin/sh
[ -x /etc/init.d/xinetd ] && /etc/init.d/xinetd condrestart 2>/dev/null >/dev/null
exit 0
Triggers
imap <
1:2002d-6mdk
/bin/sh
if [ -r /etc/c-client.cf ]; then
if grep -q "^set mail-subdirectory Mail" /etc/c-client.cf; then
perl -pi -e 's/^set mail-subdirectory/\#set mail-subdirectory/g' \
/etc/c-client.cf
fi
fi