Sieve Filters

Sieve is a server-side mail filtering language supported by many IMAP servers. In Cypht, Sieve filters let you define rules that run automatically on every new message as it arrives, as long as the filter is active. Because the rules execute on the mail server itself, they work even when you are not logged into Cypht. Messages are sorted, flagged, forwarded, or discarded before they ever appear in your inbox view.
Automatic

Active filters process every incoming message without manual intervention.

Server-side

Rules run on the mail server, so they work even when Cypht is closed or your device is off.

Flexible

Move, copy, flag, discard, redirect, or run custom Sieve scripts on matching messages.

Requirement

Your mail server must support Sieve or ManageSieve. IMAP support alone is not enough — some providers do not expose Sieve management even though they support reading mail over IMAP.

Before you can create any filter, the sievefilters module must be activated in your Cypht configuration. If the Sieve Filters section is already visible under Settings, you can skip this step. Add sievefilters to the CYPHT_MODULES variable:
CYPHT_MODULES="core,imap,smtp,sievefilters"
Add a new module entry:
modules[]=sievefilters
After saving the configuration, reload or redeploy your Cypht instance. The Filters menu will then appear under the Settings tab.
Settings sidebar showing the Filters menu item

The most direct way to manage filters is through the dedicated Sieve Filters page in Settings.
  1. Open Settings in the sidebar.
  2. Click Filters.

  3. Filters page showing the selected email account

  4. Select the email account you want to manage.
  5. Click Add Filter.

  6. Filter list with Add Filter and Add Script buttons

  7. Enter a filter name and set its priority.

  8. Empty Add Filter modal with name, priority, conditions and actions fields

  9. Add one or more conditions (sender, subject, recipient, body, etc.).
  10. Set the test logic: use ALLOF if every condition must match, or ANYOF if any single condition is enough.
  11. Choose the action: move to folder, copy, flag, discard, redirect, etc.

  12. Filled Add Filter form with conditions and redirect action

  13. Click Dry Run to test the filter against visible messages and verify it matches the right ones.
  14. Save the filter.
Priority order
Filters run from the lowest priority value to the highest. Place precise, high-confidence rules at lower numbers and broad catch-all rules at higher numbers to avoid conflicts.
Cypht now includes a Custom Actions dropdown in the message list controls so you can create, test, and reuse advanced filters without leaving the current view.
Custom Actions dropdown

Clicking Custom Actions opens a dropdown containing your existing custom actions plus a Create from Selected entry.

Reusable actions

Filters created from this workflow are automatically saved as custom actions so they appear in the dropdown the next time you need them.

Quick editing

Selecting an existing custom action opens the edit modal directly, which makes it easy to refine the rule before using it again.

All saved filters and scripts appear in the list on the Sieve Filters page. Click any entry to open the edit modal where you can update conditions, change actions, or delete the filter entirely.
The Custom Actions dropdown in the message list toolbar lets you build filters directly from messages you are looking at, without navigating to Settings.
  1. Select one or more messages in the current mailbox view.

  2. Inbox with selected messages and toolbar showing QuickActions

  3. Click the Custom Actions button in the toolbar.
  4. Click Create from Selected.

  5. QuickActions dropdown showing Create from Selected option

  6. Review the auto-populated conditions (From addresses and Subject keywords are prefilled from the selected messages).

  7. Setup Filter from selected messages modal with auto-populated From emails and Subject keywords

  8. Adjust the matching options:
    • From: Matches / Does Not Match
    • Subject: Contains / Does Not Contain / Ignore Subject
  9. Choose the action to apply.
  10. Click Dry Run to test the filter against visible messages — matched and unmatched messages are shown in a results panel so you can verify the rule before committing.
  11. Save the filter.
Auto-populated conditions
Cypht prefills From addresses and Subject keywords from the selected messages so you start from real data instead of an empty form.
The Dry Run button tests the current filter conditions against all visible messages in your active view and shows which messages match and which do not — without moving or changing anything.
  1. Create a filter from selected messages or open an existing custom action.
  2. Adjust the conditions, actions, and match logic.
  3. Click Dry Run in the modal.
  4. Review the matched and unmatched messages in the results panel.
  5. Close the results panel, refine the filter, and run it again if needed.
  6. Save only when the previewed behavior is correct.
Preview results

Matched and unmatched messages are listed in a dismissible results panel. Refine conditions and run again until the preview is correct.

Respects filter logic

Dry Run uses the same ALLOF / ANYOF logic as the real filter, so the preview matches real-world behavior.

Filters created through this workflow are automatically marked as custom actions and appear in the Custom Actions dropdown for future use. Click any existing action in the dropdown to reopen its edit modal, adjust conditions, dry run it against the current messages, or delete it.
When you are reading a single email and want to filter similar messages in the future, use the Filter similar messages button.
  1. Open the message you want to base the filter on.

  2. Opened message showing Filter similar messages button in the action bar

  3. Click Filter similar messages in the message actions area.
  4. Select the fields to match (From, To, Subject, Reply-To) and click Create filter.

  5. Filter similar messages dropdown with From, To, Subject and Reply-To checkboxes

  6. Review the prefilled conditions — Cypht auto-populates the filter name, sender, recipient, and subject from the opened message.

  7. Add Filter for message like this modal with auto-populated conditions and actions

  8. Adjust the conditions and choose the action (move, flag, discard, etc.).
  9. Click Dry Run to preview which messages would match before committing.
  10. Save the filter.
One-click starting point
This is the fastest way to react to a single message. You do not need to go to Settings or select multiple messages first — just open the email and create the rule from it.
Where does the filter go?

The filter is saved to the same Sieve Filters list on the Settings page. You can edit or delete it later from there, or reuse it as a custom action.

Filter not appearing?

Verify that the sievefilters module is enabled and that your instance has been reloaded after the configuration change.

Filter saved but not running?

Check whether your provider supports ManageSieve and whether the selected account is the same mailbox that receives the tested messages.

Best practice

When debugging, disable or simplify overlapping rules. Two filters that both match the same message can produce inconsistent behavior when the real issue is rule order.