Skip to content

Conversation

@EINDEX
Copy link

@EINDEX EINDEX commented Jan 7, 2026

Summary

Adds support for routing notifications based on sender email address in addition to recipient address.

Backward Compatible: Users do not need to upgrade the config for this update.

Resolves #145

Changes

  • Enhanced SimpleRouter to match on both sender and receiver patterns using fnmatch
  • Supports two configuration formats:
    • Direct: sender -> config (implicit *@* receiver)
    • Nested: sender -> receiver -> config

Example

Sender-based routing:

configs:
  [email protected]:
    urls:
      - pushover://...
  [email protected]:
    urls:
      - discord://...

Fine-grained control:

configs:
  monitoring@*:
    [email protected]:
      urls:
        - slack://...## Testing
  • ✅ Added tests for direct and nested configurations
  • ✅ Pattern matching with wildcards
  • ✅ All existing tests pass (backward compatible)

Note

This integrates sender routing directly into the core router, unlike my import_code gist approach.
This provides better maintainability and doesn't require separate config files.

EINDEX and others added 11 commits June 28, 2025 20:22
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@v3...v4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
…gurations

- Modified the senders attribute to include receiver keys.
- Enhanced the load_from_yaml function to handle both direct and nested configurations.
- Updated tests to reflect changes in sender and receiver key handling.

Signed-off-by: EINDEX <[email protected]>
@EINDEX EINDEX mentioned this pull request Jan 7, 2026
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.

Routing by sender

2 participants