I'll try to keep this short. I want beta.example.com to use my server as a mail server. I see that dovecot and postfix have only one line for a certificate. So I made a cert for mail.example.com which is completely valid. I tried using thunderbird to connect to my mail server (beta.example.com) and it gave me a incorrect domain warning saying the cert belongs to mail.example.com. Where did I mess up? The mx record says mail.example.com so shouldn't it know the cert is for mail.example.com? I added an exception however it still fails (after it prompts me for my password). I looked at my server and it appears dovecot is rejecting the connection because thunderbird is giving it bad cert data.
dovecot confusing site cert with mail cert
ssl;certificates;dovecot