Thanks Maxim, you are correct about not making the /mail location a regex, it solves the problem.
As for the core dump I compiled v1.9.3 with your patch and can confirm it no longer crashes with the original config.
But as you suspected the config anyway does not work without removing the regex for the /mail location...
Thanks for the quick fix!