

- For incoming mail, on your server run a mail retrieval agent like fetchmail to fetch mail from the externally hosted mailbox into a maildir on your server.
- To serve that maildir to your clients, on your server run a mail delivery agent like the IMAP server Dovecot.
- To accept outgoing mail from your clients, on your server run something like Postfix with a
relayhost
configured with the details of your externally hosted SMTP server.
There’s nothing unusual or tricky about any of this arrangement.
Don’t need provider-specific apps if their services use standard protocols: