Skip to content

Create rules from a message and match sender domains - #287

Open
kanocz wants to merge 6 commits into
c9dev:mainfrom
kanocz:feature/rules-from-message
Open

kanocz wants to merge 6 commits into
c9dev:mainfrom
kanocz:feature/rules-from-message

Conversation

@kanocz

@kanocz kanocz commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

What changes

Adds Create Rule from This Message… to the message menu and individual message menu. It opens the existing rule editor with the selected message's data.

The reader can choose the sender, a recipient from To or Cc, a subject substring, and whether attachments are required. All selected conditions must match.

Sieve and local rules also support a sender domain with optional subdomains. For example, allegro.cz matches lists.allegro.cz when subdomains are included, but never notallegro.cz. Gmail API and Outlook rules do not offer this domain condition.

Why

Creating a rule currently requires entering message details by hand. Starting from a message avoids retyping addresses and subjects while keeping the conditions and actions editable before saving.

How you checked it

  • cargo test --workspace --no-fail-fast: 7750 passed, 7 failed, 19 ignored. The same seven failures reproduce on unchanged upstream on this Mac.
  • cargo clippy --workspace --all-targets -- -D warnings: passed.
  • scripts/update-po.sh --check: passed after the final edit.
  • macOS demo checks covered message prefill, the individual message menu, and sender domain selection with subdomains.
  • scripts/a11y-names.sh could not run because Xvfb is unavailable.
  • The release build completed and was installed for user testing. Tests were not rerun for installation.

Where it came from

Implemented with OpenAI Codex.

Checklist

  • cargo test --workspace passes
  • cargo clippy --workspace --all-targets -- -D warnings passes
  • scripts/update-po.sh --check passes, run after the last edit
  • scripts/a11y-names.sh passes, if the UI changed
  • New user-facing strings go through translate and have a po/pt_PT.po translation
  • New domain words are in CONTEXT.md
  • No tokens, real addresses, or real mail in code, tests, or screenshots
  • The change is mine to give under GPL-3.0-or-later

Open the existing rule editor with a chosen message and let the reader select its sender, recipient, subject substring and attachment condition. Sieve and local rules can match a sender domain with optional subdomains, without matching lookalike domains.

Validation on macOS: 7750 tests passed, with seven failures reproduced on unchanged upstream and 19 ignored. Clippy and translation checks passed; the accessibility script needs Xvfb. The user requested release installation without rerunning tests.
Merge upstream main and resolve changelog and translation conflicts, preserving both sets of entries and Portuguese translations. Regenerate translation catalogs for the combined source.

Clippy and translation checks pass. Workspace tests retain the same seven macOS failures previously reproduced on unchanged upstream; no new failures. The accessibility check cannot run without Xvfb.
Merge upstream main and regenerate the translation catalogs after the certificate review changes. Preserve upstream translations and the Portuguese translations for message rules.

Clippy and translation checks pass. Workspace tests: 7778 passed, 8 failed, 19 ignored. Seven failures match the earlier macOS baseline; the new TLS error-kind assertion also fails on unchanged upstream. The accessibility check requires unavailable Xvfb.
Merge upstream main and regenerate translation references while preserving message rule translations.

Clippy and translation checks pass. Workspace tests: 7778 passed, 8 failed, 19 ignored. All failures match the previously verified upstream macOS baselines. Accessibility checking requires unavailable Xvfb.
Merge upstream main, keep both changelog entries, and regenerate translation catalogs while preserving the rule translations.

Clippy and translation checks pass. Workspace tests: 7843 passed, 8 failed, 21 ignored. Failures match the previously verified upstream macOS baselines. Accessibility checking requires unavailable Xvfb.
Merge upstream release 1.1.1 and keep the pending message rule feature under Unreleased.

Clippy and translation checks pass. Workspace tests: 7843 passed, 8 failed, 21 ignored. Failures match the previously verified upstream macOS baselines. No UI code changed, so the accessibility check was not repeated.

This branch has not been deployed

No deployments
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.

1 participant