How to block external mails accounts in Mails app

Hi Guys,
I want to restrict users to only use “company.com” emails Accounts. How is it possible. We have 2 email account per user. user@company.com and team@company.com

This is not possible, but there is a feature request. The GitHub issue (see comments) also links to a code change that makes this possible. However, I don’t know if this still works.

I just created a firewall rule that blocks all smtp and imap connections and only allowed our on-prem servers.