i tried to workaround for this with
@@ -58,6 +59,13 @@
if [ $exit_code -ne 0 -a $exit_code -ne 130 ]; then
echo "Unexpected error: doveadm expunge '$u'"
echo "Exit Code: $exit_code"
+ if [ $exit_code -eq 68 ]; then
+ if ! [ "$(ls -A /var/spool/mail/${u}/mailboxes/${mbx})" ]; then
+ rmdir "/var/spool/mail/${u}/mailboxes/${mbx}"
+ else
+ echo "Error: Expected directory is empty!"
+ fi
+ fi
rc=1
fi
done
but this empty directory is also replicated and would be recreated.