regenconf/dovecot: make sure the home folder for vmail user is created to prevent a warning

This commit is contained in:
Alexandre Aubin 2024-01-14 18:47:17 +01:00
parent c9f2bb7911
commit 862e66c17e

View file

@ -42,7 +42,7 @@ do_post_regen() {
# create vmail user
id vmail >/dev/null 2>&1 \
|| adduser --system --ingroup mail --uid 500 vmail --home /var/vmail --no-create-home
|| { mkdir -p /var/vmail; adduser --system --ingroup mail --uid 500 vmail --home /var/vmail --no-create-home; }
# Delete legacy home for vmail that existed in the past but was empty, poluting /home/
[ ! -e /home/vmail ] || rmdir --ignore-fail-on-non-empty /home/vmail