You need an IMAP email server, that you run locally. You would download all your existing emails to it (one or more large text files), and then use any email client to connect to it and view the email archive.
It's not a trivial exercise to set it up though.