The port for imap/tls is 993.
I use the following:
set folder="imaps://$imap_user@mail.*****.net:993/"
set spoolfile=+Inbox
set header_cache=~/Mail/.cache
set record=+SentMail
set postponed=+Drafts
set trash=+Trash
set smtp_url="smtp://$imap_user@mail.*****.net:587/"
set ssl_starttls=yes
set certificate_file =~/.config/mutt/certificates/cert.pem
Typically, you can find the ports and mail server name published. It's not easy with some, ie mine, but a web search will bring it up.
You also have to match the capitalization of the spool file and record file. This was not published but I pulled it from the provider's web mail page source.