A ManageSieve client for .NET and C#.
Transiever.ManageSieve is an async-first .NET 10 library for directly managing server-side Sieve scripts through the RFC 5804 ManageSieve protocol.
Create a .NET 10 console application
With the .NET 10 SDK installed, create a new project and add the ManageSieve library.
PowerShell or Bash
dotnet new console --framework net10.0 --name ManageSieveQuickstart
cd ManageSieveQuickstart
dotnet add package Transiever.ManageSieve
Read server capabilities over TLS
Replace Program.cs with this example and set the host to your provider's ManageSieve endpoint. It requires STARTTLS on port 4190 by default and uses normal platform certificate validation.
C#
using Transiever.ManageSieve;
ManageSieveClientOptions options = new()
{
Host = "sieve.example.com"
};
await using IManageSieveClient client =
new ManageSieveClientFactory().CreateClient(options);
await client.ConnectAsync();
await client.StartTlsAsync();
ManageSieveCapabilities capabilities = await client.RefreshCapabilitiesAsync();
Console.WriteLine(string.Join(", ", capabilities.SieveExtensions));
Run the application from its project directory.
dotnet run
The result lists the server's advertised Sieve extensions. This example does not authenticate or change scripts. An unavailable endpoint, unsupported STARTTLS, or invalid certificate fails the connection.
Choose the right layer
Use this library when your application owns Sieve policy and needs direct protocol operations. Authentication is required for script operations; the library supports capability-driven SASL authentication.
Use SieveRuler for rule models, generation, reconciliation, preview, deployment, and rollback. Prefer a command-line tool? Start with msieve.
The library reference covers public contracts and script operations; the authentication guide covers mechanism selection and security.
Automated integration tests exercise the supported command set against a pinned Dovecot/Pigeonhole image; deterministic unit tests cover fragmented input and protocol edge cases.