It's not clear to me what exactly you are trying to achieve.
Do you actually have a local mail server? What is the server software, as a matter of interest? Is the server fully accessible to the outside world? If so, via what protocols?
Is your O365 client running locally on your PC or is it a web client?
** edit **
And do you want to connect to your local mail server only via your local network (whether wireless or wired) or also from the outside world via the Internet?