Server-side mail filters in OX App Suite with Sieve and ManageSieve

OX App Suite lets users write mail rules that the mail backend applies on delivery, stored as Sieve scripts. This page explains how that path works, what to configure, and what to confirm before you rely on it.

On this page

How server-side mail filters in OX App Suite with Sieve work for your users

Users expect their mail rules to run whether or not a client is open, so admins need to know exactly where those rules live. In OX App Suite, a rule the user creates in the mail settings is stored as a Sieve script on the mail backend, not in the browser or the App Suite database. The App Suite UI talks to the backend over ManageSieve, the protocol that lets a client upload, list, activate and delete scripts. The mail server then runs the active script when a message is delivered, which is why filing, forwarding and rejecting still happen while the user's laptop is asleep. For this to work, the backend must have a Sieve service with the required extensions enabled, and App Suite must be pointed at it. Confirm the exact Sieve and ManageSieve support, including the Pigeonhole version, with your backend vendor and against the OX App Suite requirements for your release before you promise any behavior to users.

Teams usually need this when delivery logic has to be shared or preserved. Typical cases are rules that other mail clients must honor, rules that must survive a move to a different client or a return to IMAP access, and shared or function mailboxes where filing should happen once for everyone. It also matters for compliance reviews of mail handling, because a reviewer will ask where automatic forwarding and deletion are decided and whether they can be inspected. Keeping scripts on the backend lets you answer that with the mail server's own configuration and logs instead of a per-user browser state. Ask your backend team which script location, quotas on script size and count, and admin tools are available, since these decide how much you can audit without touching user accounts.

Decide early whether users may edit these scripts outside App Suite. Because the scripts are plain Sieve files managed over ManageSieve, a second client can change the active script, and a careless edit can override or break what the user set up in the UI. Agree on a rule for that case, such as which script name App Suite owns, how manual edits are reviewed, and how a broken script is detected and rolled back. Test this with a representative user before rollout, covering delivery with no client open, a rule edited outside App Suite, and a syntax error, so support knows what the user will see.

How a rule travels from App Suite to the mail backend

The path starts in the browser, where a user saves a rule in the mail settings of OX App Suite. The middleware turns that change into a call to the mailfilter v2 API and uploads the resulting Sieve script to the Sieve server over ManageSieve, which stores it against the user's mailbox. The trust boundary sits between the App Suite middleware and the mail server, so confirm which credentials the middleware uses for ManageSieve and who else can reach that port. Delivery is the second half: the mail backend runs the stored script when a message arrives, so a rule that saves without error can still fail at delivery time.

Rule save path, trust boundary, and script execution at delivery.

Configuration options and when each fits

This table compares three ways to manage user mail rules: App Suite only, App Suite plus a ManageSieve client, and admin-provisioned scripts. Read each row for the fit, the dependency on the Sieve server, and the trade-off you accept. Confirm every configuration key in the Operations Guide before you commit to a model.

OptionBest fitSieve server dependencyOperational trade-off
Rules managed only in App SuiteOrganizations that want one place for users to create filters and no direct script accessApp Suite writes scripts to the Sieve server over ManageSieve, so the server must accept those connections and store the scriptsSimplest support model, but users cannot edit or back up rules outside App Suite and troubleshooting depends on App Suite logs
Rules also editable through a ManageSieve clientTeams with power users or mail administrators who edit scripts directly in a desktop or command-line toolScripts live on the Sieve server, so the same script set must stay readable and writable by both App Suite and the external clientConcurrent edits can overwrite each other, and a script that an external tool breaks may not display correctly in App Suite
Admin-provisioned or shared scriptsCommon rules such as disclaimers, spam routing or departmental forwarding that should apply to every account in a groupAdmins deploy scripts through the Sieve server or its tooling, and the server must enforce execution order against user rulesRequires a change process for every shared rule, and conflicts with user scripts must be tested before rollout
Rules executed on delivery onlyAny deployment where filters must act when mail arrives, including while the user is offlineThe mail backend runs the Sieve script on delivery, so filter behavior depends on the Pigeonhole Sieve extension version in useErrors surface at delivery time, so you need logging and a test plan for scripts before users rely on them
Confirm the Sieve and ManageSieve configuration keys in the Operations Guide and your Dovecot and Pigeonhole versions before choosing a model.Settings and defaults vary by deployment, so do not assume a default from another environment.Ask your partner to document which model each user group uses.Record the chosen model in your change records.

Setting up Sieve filters for OX App Suite step by step

This sequence takes a team from a mail backend that speaks Sieve to a tested server-side rule that runs on delivery and stays readable outside App Suite. Each step ends with a check, so you know the layer below works before you rely on it.

  1. Confirm the mail backend offers Sieve and ManageSieve

    Your mail administrator confirms that the IMAP backend provides a Sieve server reachable over the ManageSieve protocol, with the filtering extensions App Suite needs enabled. Backend requirements, including the Dovecot and Pigeonhole pairing, are covered in the Connecting the Dovecot IMAP backend to OX App Suite topic, so work through that first. Done means a ManageSieve client can authenticate to the server with a test mailbox and list the scripts stored for it. If the listing fails or the extension is missing, stop here, because App Suite cannot write rules to a server that does not offer them.

  2. Confirm the mailfilter v2 API is enabled

    Check that the App Suite release in use exposes the mailfilter v2 API and that the mail filter feature is switched on for the context or user group that will create rules. Your platform team reads the configuration keys in the deployment values and confirms them against the requirements documentation for the release. Done means a test user can open the mail rules settings in the web client without an error and the API responds to a request for the user's existing filter list. If the rules screen is absent, the feature flag or API version is the likely cause, and you should confirm it with Open-Xchange support before changing anything else.

  3. Configure the mailbox connection for filtering

    Point App Suite at the Sieve server by setting the ManageSieve host, port and connection security in the mail filter configuration, then choose how the middleware authenticates to it. Use a dedicated service identity or the user's own session credentials, and document which one you chose because it determines who can read and change scripts. Done means the middleware logs a successful ManageSieve session for the test user, and the rules screen shows the test mailbox's current script with no connection warnings in the logs.

  4. Create and test a simple rule end to end

    As the test user, create one low-risk rule, for example one that files messages from a single test sender into a named folder, and save it from the web client. Send a matching message from an outside account and confirm the message arrives in the folder, not the inbox. Done means the rule is saved, the message is filed on delivery, and a non-matching message stays in the inbox. Keep the rule and sender names obviously test values so they are easy to remove afterward.

  5. Verify the script on the Sieve server

    Using a ManageSieve client with the test user's credentials, not App Suite, list the scripts for that mailbox and download the active one. Confirm the script contains the rule you created from the web client, that it is marked active, and that the folder and sender match what you configured. Done means the external client shows the same script the web client produced. If the script is missing or differs, App Suite is writing to a different store or account, and you should fix the connection before creating more rules.

  6. Confirm rules stay editable outside App Suite

    Edit the same script with the external ManageSieve client by adding a harmless comment or changing the test folder name, activate it, and then reload the rules screen in App Suite. Done means App Suite displays your external change, and a new message reflects the edited rule on delivery. Record this result in your runbook, because it confirms that administrators and migration tools can read and repair rules without the web client. Also agree with your team whether users may edit scripts by hand, since App Suite may not display hand-written constructs it does not recognize.

Why rules run on delivery and not inside the browser

A rule that lives in the browser only runs when the browser is open. In OX App Suite, user filters are stored as Sieve scripts on the mail backend and executed there when a message arrives. That placement is the reason a filter that moves newsletters or flags invoices keeps working while the user is on a phone, in a desktop IMAP client, or away from the web interface for a week. A client-side filter would sort mail only for whichever client evaluated it, and any message read first in a different client would land in the wrong folder or stay in the inbox. Before you commit to a design, confirm with your mail backend team which clients your users run and whether any of them is expected to apply rules on its own.

The practical consequence is that the mail server, not App Suite, owns the rule set. App Suite edits the scripts through ManageSieve and the mailfilter API, but the scripts sit on the Sieve server and are applied on delivery, so a rule change takes effect for the next message without a client refresh. Check that your Sieve server and the Pigeonhole extension are the versions your App Suite release expects, and that the ManageSieve endpoint is reachable from the middleware and restricted to it. Plan the same check after every backend change, because a filter that works in testing can still fail if the server does not accept a particular extension used by a script.

Upgrades and backend changes need an explicit plan for rules. Because the scripts are data on the mail server, they normally survive an App Suite upgrade, but a change of mail backend, a Sieve server upgrade or a move of mailboxes between servers can alter how scripts are parsed or where they are stored. Ask your partner or your team to export a sample of scripts before each change, run a set of test messages through the old and new configuration, and confirm that a user's rules can still be read and edited in App Suite and in a standalone ManageSieve client. Keeping the scripts editable outside App Suite gives you a fallback if the web interface is unavailable during a migration.

Security and operational risks of server-side mail rules

Server-side rules run on the mail backend at delivery time, so a bad rule can hide mail, leak it or stop it arriving without any visible error for the user. The cards below cover the failure modes that matter most and the checks to put in place before rules reach production users.

Silent forwarding and discarding

A rule that redirects mail to an external address or discards it with no notification leaves the user unaware that messages are missing. Review which actions are allowed for end users, such as forward, discard, or fileinto, and decide whether external forwarding is permitted at all. Test each action with a sample message in a non-production mailbox and confirm the result is visible in the user's folders and the sent or delivery logs.

Admin access to other users' scripts

Administrative tools that read or edit ManageSieve scripts can expose one user's filtering logic to another person, including rules that route mail to a third party. Confirm which accounts can list or open another user's script, log those reads, and restrict the role to a named group. Run a test with a non-admin account to verify it cannot fetch scripts belonging to other mailboxes.

Validation failures that block delivery

A script with a syntax error or an unsupported extension can cause the mail backend to reject or defer incoming messages for that mailbox, depending on how the server handles a failed script. Ask the mail backend team how invalid scripts are handled and whether the user is notified. Build a check that runs sieve-test or equivalent validation on every saved script before it is activated.

Logging of rule actions

Delivery logs should record which script ran, which action fired and whether the message was filed, forwarded or discarded, without storing message bodies. Without these entries, support teams cannot explain why a message is missing. Confirm the log format and retention with the mail backend vendor, and make sure the log pipeline can search by mailbox and script name.

Audit evidence for rule changes

Compliance reviewers will ask who created or edited a rule, when, and what it did before and after the change. Keep a versioned copy of each script outside the user's mailbox, such as in a Git repository or a configuration store, and record the editor identity from the App Suite session. Test the trail by changing a rule and confirming the old and new versions are both recoverable.

Rules that outlive their owners

Rules belonging to leavers or shared function mailboxes can keep forwarding mail after the account owner has gone. Add a review step to the leaver process that lists active scripts with external actions and disables or reassigns them. Schedule a periodic report of scripts that forward externally so the security team can review them.

Questions buyers ask about OX App Suite mail filters

How much effort does a Sieve filter setup for OX App Suite take?

Effort depends on the number of mail backend components involved, how many rule types you want users to create, and how much of the rule set you need to migrate. A basic setup that lets users create simple rules on an existing Dovecot and Pigeonhole server is a smaller job than a setup that also covers migrated scripts, shared mailboxes and custom Sieve extensions. The main cost lines are discovery of your current mail backend, configuration and testing, and documentation for your support desk. Ask any partner for a quote built from a written scope that lists the mailbox types, rule types and environments covered. Confirm the exact Sieve extensions and server versions your mail backend supports with your mail backend vendor before you commit to a scope.

Can users create and manage their own mail rules in OX App Suite?

Yes, users can typically create and manage their own filter rules in the App Suite interface, which stores them as Sieve scripts on the mail backend through ManageSieve. Whether a given rule type is available depends on what your Sieve server supports and on the configuration you choose for the mailfilter interface. Decide early which actions users may take, such as moving to folders, forwarding, vacation replies or rejecting mail, because forwarding and rejection carry the most risk. Confirm the supported rule types and the mailfilter API version with your deployment before you publish a user guide.

What does the work need from our team?

The work needs a few specific inputs from your side before the build starts. You need administrative access to the Sieve and IMAP services, or a named contact who can make changes there, and a test tenant or test mailboxes that mirror production accounts. You also need change windows for any configuration change to the mail backend, plus an owner who can approve rule types that affect mail delivery. Ask for a written list of these inputs in the scope document so that delays do not come from missing access. Your mail administrators will also need to confirm where scripts are stored and who may edit them.

Can filter rules be edited outside OX App Suite?

Yes, Sieve scripts are plain text stored on the mail backend, so they can be read and edited with any ManageSieve client that the server supports. Keeping rules editable outside App Suite is useful for administrators who need to fix a broken script when the web interface is unavailable. It also creates a risk, because a manual edit can make a script that App Suite cannot display or parse. Agree in advance how external edits are logged, who may make them, and how App Suite should handle scripts it did not write. Confirm the exact ManageSieve behavior of your server version with its vendor.

How long does validation of mail filters take?

Validation time depends on the number of rule types in scope, the number of mailbox scenarios you need to test, and whether you test on a staging environment before production. Testing usually covers delivery into folders, forwarding, rejection, vacation replies, rule ordering and how rules behave with shared or secondary accounts. Plan a change window for the production rollout and for any rollback. No supplied figure sets a duration for this work, so ask any partner for a timeline in the written scope and check it against your test mailbox availability.

What version and compatibility checks should we run first?

Start by confirming your Kubernetes and Helm baseline, because OX App Suite v8 is delivered as Helm charts and requires Helm 3.17.0 or newer. Then confirm the supported versions of your mail backend, Sieve server and ManageSieve implementation against the OX App Suite requirements. Check the supported release channel and the current LTS status in the support commitment before you choose a version to deploy. Record every version in your change plan so that a later upgrade does not break existing scripts.

Does our data or mail content leave our infrastructure during this work?

The filter work is done inside the infrastructure you control, and mail scripts and test messages stay on the servers you approve for the engagement. Confirm with your security team how test mailboxes are created, how access is granted and removed, and where any logs or screenshots are stored. Ask for the access model and data handling steps in writing before the work starts. This answer describes how the work is planned, so check the final approach against your own data protection requirements.

Keeping rules editable outside App Suite

Keeping filter rules editable outside App Suite is a design decision you make before the first user creates a rule, because it determines whether the Sieve scripts stay portable. Each user's rules are stored as Sieve scripts on the mail backend and are reachable through ManageSieve, so any ManageSieve-capable client that the mail server accepts can read or change them. Teams usually want this for three reasons: recovering a user's rules when the web interface is unavailable, moving rules to or from another platform, and giving auditors a way to read the exact logic that runs on delivery. Confirm with your mail backend vendor and your App Suite deployment team which ManageSieve clients and ports are permitted, and whether the rules console in App Suite can read scripts it did not write.

The admin team must agree on rules before anyone edits a script outside App Suite. Decide the script naming convention and which script is the active one, since only one script is active at a time on a Sieve server. Decide ownership: whether rules belong to the user, to a shared or function mailbox, or to the administrator who maintains a standard set of filters. Then decide conflict handling. If a user saves a script in App Suite while an administrator has the same script open in another client, one save will overwrite the other unless the server or client detects the change, so ask the vendor how the ManageSieve version check behaves and write down a rule such as freezing edits during a maintenance window or keeping one editor per script.

Plan exit and migration of rules as a separate workstream with its own test set. Export each user's scripts, record which script is active, and keep the original text under version control so you can show what changed and when. Test each script against sample messages on the target platform, because Sieve extensions and their supported versions differ between servers and an unsupported extension can silently stop a rule from running. For moving filters between platforms, the migration topic in this content group covers the steps in detail. Before you commit to any platform, ask the vendor and your implementation partner to confirm which Sieve extensions your mail backend supports.

How the setup differs by deployment context

When your team runs OX App Suite on Kubernetes in your own infrastructure, you also decide how the mail backend is built. The Sieve path depends on a self-managed Dovecot with the Pigeonhole plugin, so the ManageSieve listener, the script storage location and the Sieve extensions enabled on the server are all choices you make and maintain. Upgrades of the mail backend follow your own change process, not the App Suite release cycle alone.

  • Backend version pinning: Pin Dovecot and Pigeonhole to versions the App Suite release notes and your vendor documentation both list as compatible.
  • Network exposure: Decide whether ManageSieve is reachable only from the middleware pods, and enforce TLS and authentication on that port.
  • Script storage: Choose where user scripts live on the mail store and include them in backup and restore tests.
  • Extension set: Enable only the Sieve extensions your rules need, since each enabled extension widens what a script can do.
  • Operational ownership: Assign who patches the backend, watches its logs and restores scripts after an incident.

Confirm with your App Suite contact which Dovecot and Pigeonhole versions are supported for your release, and with your mail backend vendor how ManageSieve authentication is expected to work in your topology.

Verifying filters after go-live and during upgrades

This sequence gives you a repeatable way to confirm that server-side rules still deliver mail as designed after go-live and after each App Suite or Dovecot upgrade. The output is a regression script set and a dated record of test results you can reuse each time.

  1. Define the test rule set and expected outcomes

    Before go-live, the platform team and a named business owner agree on a small set of test rules that cover each action the users rely on: move to a folder, discard, forward to an external address and a vacation-style auto reply. For each rule, write down the test message that should trigger it, the folder or outcome you expect and the header or body marker that proves the rule ran. Keep the list in version control next to the rest of your configuration. The step is done when every rule has a written expected result that someone other than its author can check.

  2. Create dedicated test mailboxes and rules

    Create one or more test accounts that are not used by real staff, and build the test rules in them through App Suite's filter interface so the test covers the same path a user takes. Export or record the resulting Sieve script from the ManageSieve side so you can confirm exactly what was stored. Use test senders you control, and do not send test traffic to real customers or external parties except the forward target you own. The step is done when each test account holds the rules from your list and the stored script matches what the interface shows.

  3. Send controlled test messages

    Send a fixed set of messages to the test accounts from an internal sender and from an external address you control. Each message should match exactly one test rule so a failure points to a single cause, and at least one message should match no rule to confirm that unmatched mail follows the default path. Record the send time, sender, subject and message identifier for each. The step is done when every test message has been sent and logged, with the expected outcome noted beside it.

  4. Confirm delivery results in IMAP

    Check each test mailbox over IMAP, not only in the App Suite web interface, to see where each message landed. Confirm that moved messages sit in the target folder, discarded messages are absent from the inbox and the expected folders, forwarded messages reached your external test address, and the vacation reply was generated once and not repeated for the same sender. Compare the results with your expected outcome list. The step is done when each message has a recorded actual result and any mismatch is logged as a finding with the rule name attached.

  5. Check mail backend and filter logs

    Review the logs from the mail backend and the Sieve execution path for the same test window, matching on the message identifiers from the send log. Look for the rule that fired, any Sieve compile or runtime errors, and warnings about forward or vacation actions being refused. Confirm that no errors appear for the messages that matched no rule. Log retention and the location of these logs depend on your Dovecot and Pigeonhole setup, so confirm the exact log sources with your operations team before the first run. The step is done when each test message can be traced from send to rule execution to final folder in the logs.

  6. Save the run as a regression script set

    Turn the send, IMAP check and log check into scripts that accept the test account names and message fixtures as inputs, and store them with the rule definitions and expected results. The scripts should exit with a clear pass or fail per case so they can run unattended. Store the first complete run as the baseline, with the versions of App Suite, Dovecot and Pigeonhole recorded beside it. The step is done when a second run against the unchanged environment reproduces the baseline results.

  7. Repeat the set after each upgrade

    Run the regression scripts after every App Suite upgrade and every Dovecot or Pigeonhole upgrade, before the change is released to users, and again on a test environment that mirrors production where you have one. Compare each result with the baseline and investigate any difference in rule behavior, log output or folder placement before sign-off. Confirm compatibility of the mail backend version with the App Suite release notes for the target version, since the compatibility of your specific mail stack is something to verify with Open-Xchange and your Dovecot vendor. The step is done when the post-upgrade run matches the baseline or each difference has a recorded decision.

  8. Record results and retire obsolete cases

    After each run, store a dated report with the pass or fail status per case, the software versions tested and the names of the people who approved the change. When a business owner retires or changes a rule, update the expected results and the scripts in the same change so the regression set stays accurate. The step is done when each upgrade has a signed-off report on file and the baseline reflects the rules users currently have.

How DeployOpen scopes and delivers mail filter work

The scope of a Sieve filter engagement is agreed in writing before any script is changed. The written scope should name the mail backend and its Sieve server, the ManageSieve endpoint App Suite will use, the rule types users are allowed to create, the rules that administrators will set centrally, and the environments involved (lab, staging and production). It should also say which filter features the client needs, such as the mailfilter v2 API behavior, vacation responses, and any rules that touch categories or shared mailboxes. Ask the client to confirm the exact Dovecot and Pigeonhole versions in use, because Sieve extensions and their availability depend on the server build. DeployOpen does not issue audit reports or certifications. Its work produces tested configuration, evidence and documentation that the client's own auditors or certification bodies may review.

DeployOpen then tests Sieve behavior against the client's own mail backend rather than a generic reference server. Test messages cover delivery into folders, discards, redirects, vacation replies, and rules that conflict or run in an unexpected order. Each test records the script version, the expected result and the observed result, so a failure can be traced to a rule rather than to the client's mail flow. Tests also confirm that a script saved through App Suite can be read and edited through ManageSieve by an external client, which is the check most often skipped. The output is a test set the client can rerun after any change.

DeployOpen documents the rule model and hands it over in a form the client's operations team can maintain. The handover covers which rule types are user-editable, which are fixed by administrators, the naming and ordering conventions, the mailbox and folder structure the rules target, and the procedure for changing a rule safely. It also includes a short runbook for when a script fails to compile after a server upgrade. Retainers are available for ongoing upgrades to the mail backend and App Suite release line, and for retesting the rule set after each change, so the test set stays aligned with the environment it protects.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.