When users receive an email confirming that they've been added to a site, the message body contains an instruction to open the URL for Sakai, but that URL is missing the portal path. I think I see where the correction should be made:
org.sakaiproject.tool.sitesetup.SiteAction line 10365 you should get and assign the portalUrl, not the serverUrl, to productionSiteUrl.
As a separate issue, also check these other two places for an additional copy of the URL. I'm not sure about these other two calls though because I don't have a full copy of the generated email:
org.sakaiproject.component.legacy.notification.SiteEmailNotificationContent line 207
org.sakaiproject.component.legacy.notification.EmailNotification line 186
In both cases, ServerConfigurationService.getServerUrl() might need to be ServerConfigurationService.getPortalUrl().