post_install() { #set up the /var/run directory systemd-tmpfiles --create /usr/lib/tmpfiles.d/courier-mta.conf # perform all the tasks required of a standard Courier install echo Performing install-configure... /usr/lib/courier/sysconftool /etc/courier/*.dist > /etc/courier/upgrade-$1.log echo ...output saved to /etc/courier/upgrade-$1.log echo "Do not forget to choose an account to receive postmaster mail." makealiases makesmtpaccess /usr/bin/mkdhparams } pre_upgrade() { # the file courier-imapd.conf is renamed to courier-mta.conf for version 0.77.0-2 [ -f /usr/lib/tmpfiles.d/courier-imapd.conf ] && rm -f /usr/lib/tmpfiles.d/courier-imapd.conf } post_upgrade() { echo Performing install-configure... /usr/lib/courier/sysconftool /etc/courier/*.dist > /etc/courier/upgrade-$1.log echo ...output saved to /etc/courier/upgrade-$1.log } pre_remove() { # there may be many files not part of the original installation that would be useful to save # so save the whole configuration directory rather than try to list all possibilities # in backup(). Also avoids creation of .pacsave files in alias and smtpaccess directories that # process all files mv -f /etc/courier /etc/courier-$1 cat << EOM --> /etc/courier has been saved as /etc/courier-$1 EOM # clean up the /run and /var/spool directories systemd-tmpfiles --remove /usr/lib/tmpfiles.d/courier-mta.conf }