Running SmarterMail under a virtual directory has always been problematic with certain protocols (autodiscover, microsoft-based protocols like EWS, etc). This is why our recommended approach has for a long time been using a combination of
mail.example.com and autodiscover.example.com.
It becomes even more so in .NET 8 due to the way paths get rewritten when being returned through Application Request Routing, as well as binding issues with automatic SSL certificates. As such, we can no longer recommend or support running SmarterMail running under a virtual directory.
As a temporary measure to get things running, you can add a header for X-Forwarded-Prefix into both rewrite rules in web.config (under HTTP_X_Forwarded_Proto), and that should get it running until you have a chance to migrate your setup and URLs. But you'll likely still have issues going forward, and you'll have to add the record back when you upgrade.
Grady Werner
SmarterTools Inc.
www.smartertools.com