You use an IMAP syncer, like this one:
A word of caution: I professionally hosted email for over a decade.
90% or incoming email will be spam. Anti-spam tools will need regular updates. Backups are also super important.
All things considered, I don’t host my own email anymore although I know all the pieces involved.
There are also some independent email hosts that are good like Fastmail or for extra privacy, Proton Mail.
Ghost has a lot of these features as well as being a blog and handling paid subscriptions and donations.