--- courier/webmlmd.rc.in.orig	2013-08-25 20:57:42.000000000 +0200
+++ courier/webmlmd.rc.in	2020-04-20 23:41:05.000000000 +0200
@@ -3,46 +3,46 @@
 case "$1" in
 
 /*)
-	prog="$1"
+	prog="$0"
 	;;
 *)
-	prog="`which $1`"
+	prog="`which $0`"
 	;;
 esac
 
 set -e
 
-case "$2" in
+case "$1" in
 start)
-	if test "$3" = ""
+	if test "$2" = ""
 	then
 		echo "Usage: $prog start [configfile]" >&2
 		exit 1
 	fi
 
-	@SETENV@ -i @SHELL@ -c "set -a; . $3; $prog check || exit 1; \
+	@SETENV@ -i @SHELL@ -c "set -a; . $2; $prog check || exit 1; \
 		@courierlogger@ -pid="'"${PIDFILE}"'" $LOGGEROPTS -start $prog"
 	exit $?
 	;;
 stop)
-	if test "$3" = ""
+	if test "$2" = ""
 	then
 		echo "Usage: $prog stop [configfile]" >&2
 		exit 1
 	fi
 
-	@SETENV@ -i @SHELL@ -c "set -a; . $3;\
+	@SETENV@ -i @SHELL@ -c "set -a; . $2;\
 		@courierlogger@ -pid="'"${PIDFILE}"'" $LOGGEROPTS -stop $prog"
 	exit $?
 	;;
 restart)
-	if test "$3" = ""
+	if test "$2" = ""
 	then
 		echo "Usage: $prog restart [configfile]" >&2
 		exit 1
 	fi
 
-	@SETENV@ -i @SHELL@ -c "set -a; . $3; $prog check || exit 1; \
+	@SETENV@ -i @SHELL@ -c "set -a; . $2; $prog check || exit 1; \
 		@MKDIR_P@ `dirname $PIDFILE` ; \
 		@courierlogger@ -pid="'"${PIDFILE}"'" $LOGGEROPTS -restart $prog"
 	exit $?
