summaryrefslogtreecommitdiff
path: root/courier-mta/courier-mta.install
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-12-03 10:02:31 +0100
committerErich Eckner <git@eckner.net>2018-12-03 10:02:31 +0100
commitfe1270e22a3dcd9d200bfcaa991470a9e239ea82 (patch)
treed02d139e159a5b5fa49a5770964767e69f635e44 /courier-mta/courier-mta.install
parenta49bd4fc83d28e96e553d2c9298e1c2f9f8c8916 (diff)
downloadarchlinuxewe-fe1270e22a3dcd9d200bfcaa991470a9e239ea82.tar.xz
courier-authlib, courier-mta, courier-unicode: submodule -> in-tree
Diffstat (limited to 'courier-mta/courier-mta.install')
-rw-r--r--courier-mta/courier-mta.install35
1 files changed, 35 insertions, 0 deletions
diff --git a/courier-mta/courier-mta.install b/courier-mta/courier-mta.install
new file mode 100644
index 000000000..3254de08b
--- /dev/null
+++ b/courier-mta/courier-mta.install
@@ -0,0 +1,35 @@
+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/install-configure-$1.log
+ echo "...output saved to /etc/courier/install-configure-$1.log"
+ echo "Don't forget to configure an account to receive postmaster mail"
+ makealiases
+ makesmtpaccess
+ /usr/bin/mkdhparams
+}
+
+pre_upgrade() {
+ # the file courier-imapd.conf is renamed to courier-mta.conf from version 0.77.0-2
+ [ -f /usr/lib/tmpfiles.d/courier-imapd.conf ] && rm -f /usr/lib/tmpfiles.d/courier-imapd.conf
+ [ "${1%%.*}" = "1" ] && [ "${2%%.*}" != "1" ] && echo "Please make sure you have read the guidance on pre-unicode maildir names."
+}
+
+post_upgrade() {
+ echo Performing install-configure...
+ /usr/lib/courier/sysconftool /etc/courier/*.dist > /etc/courier/install-configure-$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().
+ mv -f /etc/courier /etc/courier-$1
+ echo "/etc/courier has been saved as /etc/courier-$1 - you may remove this folder if you wish."
+
+ # clean up temporary storage
+ rm -rf /run/courier /var/spool/courier
+}