Skip to main content

Managesieve

@shrug/managesievev2026.10.03.1· MIT· 13d agoBEHAVIORS
01README

Provider-agnostic ManageSieve (RFC 5804) client built directly on Deno's native TCP/TLS primitives -- no third-party ManageSieve library exists on npm with any real maintenance signal, so the small line protocol (STARTTLS, SASL PLAIN, and the literal/quoted string framing for LISTSCRIPTS/GETSCRIPT/PUTSCRIPT/SETACTIVE/DELETESCRIPT/CHECKSCRIPT) is implemented in-repo behind a single injectable transport seam. Read-only methods: listScripts, getScript, getActive, checkScript (CHECKSCRIPT without installing). Gated write methods: putScript, setActive, deleteScript -- dryRun defaults true, every write validates via CHECKSCRIPT first (putScript) or a live LISTSCRIPTS snapshot (setActive/deleteScript), and deleteScript refuses to remove the currently-active script. Script names/text are always sent as RFC 5804 non-synchronizing literals ({n+}), which are purely length-prefixed, so no caller-supplied content can ever be interpreted as a protocol boundary.

02Behaviors1
@shrug/managesievev2026.10.03.1extensions/models/managesieve.ts
fn listScripts()
Enumerate the user's Sieve scripts (LISTSCRIPTS) and flag which
fn getScript(name: string)
Fetch the raw text of one Sieve script (GETSCRIPT). Read-only.
ArgumentTypeDescription
namestringScript name, as returned by listScripts
fn getActive()
Report the currently active Sieve script name, or null if none
fn checkScript(text: string)
Validate a Sieve script against the server's interpreter WITHOUT
ArgumentTypeDescription
textstringSieve script source to validate
fn putScript(name: string, text: string, dryRun?: boolean)
Submit a Sieve script (PUTSCRIPT), always CHECKSCRIPT-ing it
ArgumentTypeDescription
namestringScript name to create/overwrite
textstringSieve script source
dryRun?booleantrue (default): preview only, zero mutation. false: mutate.
fn setActive(name: string, dryRun?: boolean)
Mark a script active (SETACTIVE); name="" deactivates. dryRun
ArgumentTypeDescription
namestringScript name to activate, or "" to deactivate
dryRun?booleantrue (default): preview only, zero mutation. false: mutate.
fn deleteScript(name: string, dryRun?: boolean)
Delete a Sieve script (DELETESCRIPT). REFUSES to delete the
ArgumentTypeDescription
namestringScript name to delete
dryRun?booleantrue (default): preview only, zero mutation. false: mutate.

Resources

scripts(infinite)— The full set of Sieve scripts on the server (LISTSCRIPTS)
script(infinite)— The raw text of one Sieve script (GETSCRIPT)
activeScript(infinite)— The currently active Sieve script name, or null
checkResult(infinite)— A CHECKSCRIPT validation result for ad-hoc script text
wouldAffect(infinite)— A dryRun=true preview of a write method's effect; NO mutation performed
applied(infinite)— The result of a write method executed with dryRun=false
03Stats
A
100 / 100
Downloads
7
Archive size
30.1 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License2/2earned
  • Verified public repository2/2earned
04Platforms
05Labels