diff --git a/etc/vmail.conf b/etc/vmail.conf index 745d9da..e5ad255 100644 --- a/etc/vmail.conf +++ b/etc/vmail.conf @@ -1,5 +1,10 @@ # vmail configs +# any script that includes this conf file will force user to be vmail +if [ "$USER" != "vmail" ]; then + exec su --shell /bin/bash "vmail" "$0" -- "$@" +fi + # constants readonly MYSQL_CONNECTION_INFO_FILE=/usr/local/etc/vmail-db-info.conf @@ -55,4 +60,5 @@ function vmail::yesno() { esac done + }