Hi, @Arivu K
From your description, I understand that you want to synchronize mail and calendar from local mail server with Office 365 in real time.
Therefore, you first need to have a mailbox in Office 365 that corresponds to your local mail server. Since these are two different mailboxes, real-time synchronization is not possible.
From Microsoft's perspective, it is recommended that you create a new rule in your local mail server that forwards emails to the mailbox in Office 365 when they are received by your local mail server.
Since this forum only supports Microsoft products, if you need technical support about Mail Cow, you can contact the corresponding vendor.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".