# Only first redirect in sieve script works

**URL:** https://support.stalw.art/t/only-first-redirect-in-sieve-script-works/1015
**Category:** Issues
**Created:** [July 11, 2026, 12:02pm UTC](https://support.stalw.art/t/only-first-redirect-in-sieve-script-works/1015 "2026-07-11T12:02:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![bytewurm](https://support.stalw.art/user_avatar/support.stalw.art/bytewurm/32/572_2.png) [@bytewurm](https://support.stalw.art/u/bytewurm)
#### Post date: [July 11, 2026, 12:02pm UTC](https://support.stalw.art/t/only-first-redirect-in-sieve-script-works/1015/1 "2026-07-11T12:02:06Z")

</div>

### Issue Description

I created a simple sieve script for a user via webgui. The idea is to have all incoming email forwarded to two different external adresses:

```auto
#require ["redirect"];

redirect "adr1@example1.com";
redirect "adr2@example2.de";

discard;

```

### Expected Behavior

incoming email being sent to both recipients.

### Actual Behavior

only the first recipient receives email, I can switch them, then the other one on top receives the mail (so recipient addresses are correct and receiving mailserver works).

### Reproduction Steps

just add sieve script from above for a standard user via webgui then send mail to the users’ mailadress.

### Relevant Log Output

No relevant output in DEBUG-Level, the second recipient never shows up.

But: when activating the `require ["redirect"]` line, I get:

**Capability ‘redirect’ not supported**

My expectation was that it would be redundant, but not lead to an error?!

### Stalwart Version

v0.16.x

### Installation Method

Docker

### Database Backend

RocksDB

### Blob Storage

RocksDB

### Search Engine

Internal

### Directory Backend

OIDC

### Additional Context

caddy reverse proxy

### I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.

on

### I have searched this support forum (open and closed topics) and confirm this is not a duplicate.

on

### I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.

on

---

<div class="post-metadata">

### Author: ![helpbot](https://support.stalw.art/user_avatar/support.stalw.art/helpbot/32/13_2.png) [@helpbot](https://support.stalw.art/u/helpbot)
#### Post date: [July 11, 2026, 12:02pm UTC](https://support.stalw.art/t/only-first-redirect-in-sieve-script-works/1015/2 "2026-07-11T12:02:33Z")

</div>

The limit is in the untrusted (user) Sieve interpreter settings: `maxRedirects` defaults to **1** , so user-created scripts can only issue one `redirect` per execution by default. That’s why only the first redirect works, regardless of order.

To allow two redirects, an administrator needs to raise `maxRedirects` on the `SieveUserInterpreter` singleton (WebUI: Settings › Sieve › User Interpreter), e.g.:

```json
{
  "maxRedirects": 2
}

```

Separately, the `Capability 'redirect' not supported` error when adding `require ["redirect"]` is expected: `redirect` is a core Sieve action defined in RFC 5228, not a registered extension, so it isn’t a valid name to put in a `require` list at all (only extension names like `fileinto`, `copy`, `envelope`, etc. belong there). You can safely omit the `require` line, or use the extensions actually needed.

Reference: [Untrusted Interpreter | Stalwart](https://stalw.art/docs/sieve/interpreter/untrusted)

_This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong._

---

<div class="post-metadata">

### Author: ![bytewurm](https://support.stalw.art/user_avatar/support.stalw.art/bytewurm/32/572_2.png) [@bytewurm](https://support.stalw.art/u/bytewurm)
#### Post date: [July 11, 2026, 12:10pm UTC](https://support.stalw.art/t/only-first-redirect-in-sieve-script-works/1015/3 "2026-07-11T12:10:56Z")

</div>

Works. Unexpected layer of complexity, sorry.
