App wsgetmail setup

I want to mail App-wsgetmail setup in rt5.0.4 and i am also setup fetchmail and postfix

currently i m using fetchmail mailing of my rt5 but i want use direct mail through o365 to rt5 if any have idea about that how to setup of incoming and outgoing mail through o365 at live RT5 server.