Email is a communication system with a lot of moving parts. You can't have reliable IM through existing MX servers but you may have it if for example SMTPs are running on your machine and you poll their data more (it's just an example, I know that with an SMTP running on your phone you'd have more problems).
See earlier on today's front page, another all in one mail server. It is much, much simpler than it was to do this. I've been self hosting email for nearly 20 years and the state of the art is considerably better now. Latency is virtually nonexistent and federation works.
> Reliable instant messaging
If it's based on e-mail, it's just not. (if we assume generally close-to-realtime delivery and not being blocked by random recipients)