Skip to content

feat: Add service-level IMAP email monitoring#4472

Open
annelson-rh wants to merge 1 commit intotarget:masterfrom
annelson-rh:feat/imap-email-monitoring-ui
Open

feat: Add service-level IMAP email monitoring#4472
annelson-rh wants to merge 1 commit intotarget:masterfrom
annelson-rh:feat/imap-email-monitoring-ui

Conversation

@annelson-rh
Copy link

Implements IMAP email monitoring for GoAlert services with OAuth 2.0 authentication, filter rules, and alert creation.

Which issue(s) this PR fixes:
fixes: #4471

Features:

  • Per-service IMAP configuration (host, port, mailbox, polling interval)
  • OAuth 2.0 authentication flow in UI for Gmail
  • Filter rules with pattern matching (exact, contains, regex)
  • Pattern matching on From, Subject, and To fields
  • Reply filtering option
  • Configurable alert content (headers, from, to, subject, body)
  • Email body parsing to extract clean text without MIME headers
  • 1-minute minimum polling interval with per-service tracking
  • Full UI for configuration and filter rule management

Database:

  • Single migration: 20260213130000-imap-integration.sql
  • Tables: service_imap_config, imap_filter_rules, imap_processed_messages
  • Engine processing type: 'imap'

GraphQL API:

  • Service.imapConfig and Service.imapFilterRules fields
  • Mutations for CRUD operations on config and filter rules
  • OAuth URL generation and token exchange mutations

UI Components:

  • ServiceIMAPPage - main configuration page
  • ServiceIMAPConfigDialog - IMAP settings with OAuth flow
  • IMAPOAuthDialog - popup-based OAuth authentication
  • IMAPFilterRule dialogs - create/edit/delete filter rules
  • IMAPFilterRuleForm - reusable form component

Testing:

  • Smoke test: test/smoke/imapmonitoring_test.go

  • Cypress integration test: web/src/cypress/e2e/imapMonitoring.cy.ts

  • Identified the issue which this PR solves.

  • Read the CONTRIBUTING document. (apologies for not opening feature request sooner! )

  • Code builds clean without any errors or warnings.

  • Added appropriate tests for any new functionality.

  • All new and existing tests passed.

  • Added comments in the code, where necessary.

  • Ran make check to catch common errors. Fixed any that came up.

⚠️ This code was generated using Claude (AI-assisted development).

⚠️ This code was generated using Claude (AI-assisted development).

Implements IMAP email monitoring for GoAlert services with OAuth 2.0
authentication, filter rules, and alert creation.

Features:
- Per-service IMAP configuration (host, port, mailbox, polling interval)
- OAuth 2.0 authentication flow in UI for Gmail
- Filter rules with pattern matching (exact, contains, regex)
- Pattern matching on From, Subject, and To fields
- Reply filtering option
- Configurable alert content (headers, from, to, subject, body)
- Email body parsing to extract clean text without MIME headers
- 1-minute minimum polling interval with per-service tracking
- Full UI for configuration and filter rule management

Database:
- Single migration: 20260213130000-imap-integration.sql
- Tables: service_imap_config, imap_filter_rules, imap_processed_messages
- Engine processing type: 'imap'

GraphQL API:
- Service.imapConfig and Service.imapFilterRules fields
- Mutations for CRUD operations on config and filter rules
- OAuth URL generation and token exchange mutations

UI Components:
- ServiceIMAPPage - main configuration page
- ServiceIMAPConfigDialog - IMAP settings with OAuth flow
- IMAPOAuthDialog - popup-based OAuth authentication
- IMAPFilterRule dialogs - create/edit/delete filter rules
- IMAPFilterRuleForm - reusable form component

Testing:
- Smoke test: test/smoke/imapmonitoring_test.go
- Cypress integration test: web/src/cypress/e2e/imapMonitoring.cy.ts

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: IMAP Email Monitoring

1 participant