How to fetch mails from Exchange Server?


we have an exchange server that fetches all the emails from the host. In order that internal mail can be received from ERPNext in need to fetch E-Mails from our exchange Server (not M365). But I do not know how to set it up. Can somone help me?