sieve_put_script
Create or replace a Sieve script with validation, dry-run diff checks, and overwrite protection; invalid scripts are rejected and existing versions are backed up before replacement.
Instructions
Create or replace a Sieve script. The server validates it first and nothing is written if it is invalid. Replacing an existing script requires overwrite: true; the previous version is backed up locally first (see sieve_list_backups). Recommended flow for changes: sieve_get_script → edit → sieve_put_script with dryRun: true → show the user the diff → sieve_put_script with overwrite: true once they agree. Writing never activates a script: if the script being replaced is already active, the change takes effect immediately; otherwise call sieve_activate_script.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Script name. Use an existing name (with overwrite: true) to replace that script. | |
| dryRun | No | Validate and return the diff against the server copy without writing anything. | |
| content | Yes | Complete Sieve script source. Line endings are normalized to CRLF on upload. | |
| accountId | No | Account id, as an alternative to accountName. | |
| overwrite | No | Must be true to replace a script that already exists. Leave false when creating a new script. | |
| accountName | No | Account name (from sieve_list_accounts). Optional when only one account is configured. |