".local" isn't a valid certificate for Exchange server if you want to access from the Internet, I would suggest you use ".com" to replace it. If you just use Exchange within your organization, you can still use "mail.domain.local"
If you want to use "mail.domain.com", you need to add "domain.com" as an accepted domain on Exchange server, then change all mailbox email address from "domain.local" to "domain.com".
Then change all service URL from "server.domain.local" to "mail.domain.com". You can use commands below to check them:
Get-OutlookAnywhere | Select Server,InternalHostName,ExternalHostName Get-MAPIVirtualDirectory | Select Server,InternalURL,ExternalURL Get-OABVirtualDirectory | Select Server,InternalURL,ExternalURL Get-WebServicesVirtualDirectory | Select Server,InternalURL,ExternalURL Get-ClientAccessServer | Select Name,AutoDiscoverServiceInternalUri
After modify service URL, you need to run IISReset in CMD to restart IIS service.
If you need to access Exchange server from internal of your organization, you also need to add "domain.com" as a Lookup Zones on your DC, then copy all DNS records(Such as Autodiscover, mail, ExchangeSverer) from "domain.local" lookup zone to the "domain.com" lookup zone.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.