Use 587 for SMTP, as that is the client submittal SMTP port used for authentication.
Enable and start the IMAP services if they are not already.
Follow this guide:
https://learn.microsoft.com/en-us/exchange/clients/pop3-and-imap4/configure-imap4?view=exchserver-2019
For the cert, it will use the existing 3rd party cert which are using for mail.domain.com