If you go down this route, be sure to search via roundcube or SOGo and not rainloop because the latter does not support recursive search.
A while ago @samir shared a recipe with me to make doveadm work, let me see if that still works when I find the time.