omnivore-app / omnivore

Omnivore is a complete, open source read-it-later solution for people who like reading.
https://omnivore.app
GNU Affero General Public License v3.0
12.16k stars 612 forks source link

Support for self-hosting email-inbound-handler #2963

Open Samuel-Martineau opened 10 months ago

Samuel-Martineau commented 10 months ago

I am considering moving my reading lists to Omnivore as it looks like an amazing piece of modern software. However, it is not imaginable for me to rely on hosted software for such an important task.

When looking at the source-code for the email-inbound-handler, it seems to heavily rely on GCP specifics. I am ready to try and code this integration myself, but I was wondering if there were any specific technical reasons why this was not already implemented around a general IMAP client.

Thanks for making this open-source, Samuel M.

jacksonh commented 10 months ago

Hey no technical reasons other than us not wanting to run our own email server, we use sendgrid inbound parse which calls a rest service in our infrastructure.

I think it would be an SMTP client to receive email though, not an IMAP client unless you were thinking of pulling from your own inbox?

Samuel-Martineau commented 10 months ago

I was thinking of using IMAP to allow the mail server to be on a different machine than the Omnivore instance. After a quick search, I can't seem to find a way to fetch emails from a mail server without having something like IMAP or POP3. However, if there is something obvious I am not seeing here, please tell me!

As omnivore would be the final destination for those email, I think POP3 would the most appropriate protocol.

cocoonkid commented 10 months ago

POP3 should be fine enough, but IMAP is what is used nowadays. Running my own mailserver with mailcow (which takes 5mins of maintenance a year). So I am very interested in this feature.

Samuel-Martineau commented 10 months ago

My original idea was that the emails don't really need to be preserved after having been ingested by Omnivore, so the POP3 default behaviour could have been interesting. However, after further reflection, I think the ingested status should just be handled by the \Seen flag.

Samuel-Martineau commented 10 months ago

@jacksonh I would be happy to contribute code for this feature, but I am a bit perplexed about how the current inbound mail handler is loaded. Also, do you have a preference / suggestions as to if this should be implemented as additional functionality of the inbound-email-handler package or as a separate one?