-
Notifications
You must be signed in to change notification settings - Fork 2k
feat: IMAP connector #4987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: IMAP connector #4987
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
New IMAP connector implementation for email integration shows significant gaps and missing core functionality that need to be addressed before it can be production-ready.
- Connector in
backend/onyx/connectors/imap/connector.py
lacks critical time range filtering despite accepting start/end parameters, which is essential for the Poll/Load connector interfaces - Core email processing functionality in
backend/onyx/connectors/imap/__init__.py
is incomplete with NotImplementedError stubs and commented-out code for email body processing - Email header extraction in
backend/onyx/connectors/imap/models.py
needs more robust error handling for missing content_type fields and mismatched field validations - Security improvements needed in credential handling implementation, particularly around SSL configuration and token storage
- Limited email folder support (only 'Inbox' currently) requires expansion for full IMAP capabilities
4 files reviewed, 9 comments
Edit PR Review Bot Settings | Greptile
- possible in mailing-list workflows
…ished / how login is done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a bunch o nits
* Implement fetching; still need to work on document parsing * Add basic skeleton of parsing email bodies * Add id field * Add email body parsing * Implement checkpointed imap-connector * Add testing logic for basic iteration * Add logic to get different header if "to" isn't present - possible in mailing-list workflows * Add ability to index specific mailboxes * Add breaking when indexing has been fully exhausted * Sanitize all mailbox names + add space between stripped strings after parsing * Add multi-recipient parsing * Change around semantic-identifier and title * Add imap tests * Add recipients and content assertions to tests * Add envvars to github actions workflow file * Remove encoding header * Update logic to not immediately establish connection upon init of `ImapConnector` * Add start and end datetime filtering + edit when connection is established / how login is done * Remove content-type header * Add note about guards * Change default parameters to be `None` instead of `[]` * Address comment on PR * Implement more PR suggestions * More PR suggestions * Implement more PR suggestions * Change up login/logout flow (PR suggestion) * Move port number to be envvar * Make globals variants in enum instead (PR suggestion) * Fix more documentation related suggestions on PR * Have the imap connector implement `CheckpointedConnectorWithPermSync` instead * Add helper for loading all docs with permission syncing
Description
This PR adds support for a generic email connector.
Addresses: https://linear.app/danswer/issue/DAN-2160/add-a-new-imap-connector.
How Has This Been Tested?
Unit + integration tests TODO.