notmuch – “If you want the convenience of fast, reliable search of all your email, but don’t want to give a 3rd-party access to your email… Then notmuch may be exactly what you’ve been looking for.” - Fast email-fetching and two-way tag synchronization between notmuch and GMail
How To Run Your Own Mail Server
Mail is not hard via [HN] where I found this interesting comment by user skrause.
I think the biggest pain in hosting your own mail server is getting your outbound mail delivered into the mailboxes of the large providers without being marked as spam. Especially if you don’t actually send a lot of mail, so you can never really build up a good IP reputation.
That’s why I generally recommend a hybrid setup: Host inbound mail completely by yourself so that you have full control, but ship off outbound mail to a trusted relay of a privacy oriented provider. For example https://posteo.de/en doesn’t filter any outgoing messages by sender, so you can send mail from your own domains. Your local Postfix can DKIM sign your mail before sending them to Posteo and if you add include:posteo.de to your SPF record all your mail will be DKIM signed, SPF authenticated and coming from a reputable IP, so all your deliverability issues will be gone.
Elasticsearch For Beginners: Indexing your Gmail Inbox | Hacker News; see links within.