From 435d97c282caab2ef4b582c1bf4aeb85dd439107 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Wed, 21 Nov 2018 15:43:06 +0000 Subject: [PATCH] try looking for alternatives to maildirmake etc - see #213 --- ADDITIONS/postfixadmin-mailbox-postcreation.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ADDITIONS/postfixadmin-mailbox-postcreation.sh b/ADDITIONS/postfixadmin-mailbox-postcreation.sh index 5d73e412..ba779b9f 100644 --- a/ADDITIONS/postfixadmin-mailbox-postcreation.sh +++ b/ADDITIONS/postfixadmin-mailbox-postcreation.sh @@ -52,7 +52,16 @@ if [ -e "$maildir" ]; then exit 1 fi -maildirmake "$maildir" + +# try looking for maildirmake ... +MDM=`which maildirmake || which courier-maildirmake` + +if [ "x${MDM}" = "x" ]; then + echo "Couldn't find maildirmake or courier-maildirmake in your PATH etc (via which)" >/dev/stderr + exit 1 +fi + +$MDM "$maildir" if [ ! -d "$maildir" ]; then echo "$0: maildirmake didn't produce a directory; bailing out." exit 1