Bulwark webmail plugin for SFTPGo
  • JavaScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
lip b1dfba45b8
All checks were successful
ci / test (push) Successful in 9s
0.34.6: a shared folder's path starts with Shared with me
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-02 09:24:40 +00:00
.forgejo M1: connect SFTPGo with an API key (F1), client, errors, paths 2026-11-26 10:32:35 +00:00
scripts Scaffold plugin from bulwarkmail/plugins plugin-template 2026-11-26 08:28:08 +00:00
src 0.34.6: a shared folder's path starts with Shared with me 2026-12-02 09:24:40 +00:00
test 0.34.6: a shared folder's path starts with Shared with me 2026-12-02 09:24:40 +00:00
test-utils Scaffold plugin from bulwarkmail/plugins plugin-template 2026-11-26 08:28:08 +00:00
.gitignore Scaffold plugin from bulwarkmail/plugins plugin-template 2026-11-26 08:28:08 +00:00
CHANGELOG.md 0.34.6: a shared folder's path starts with Shared with me 2026-12-02 09:24:40 +00:00
LICENSE Scaffold plugin from bulwarkmail/plugins plugin-template 2026-11-26 08:28:08 +00:00
manifest.json 0.34.6: a shared folder's path starts with Shared with me 2026-12-02 09:24:40 +00:00
package-lock.json 0.18.0: Markdown editor (Toast UI, on the draw host), New > Markdown document 2026-11-26 20:26:27 +00:00
package.json 0.34.6: a shared folder's path starts with Shared with me 2026-12-02 09:24:40 +00:00
README.md 0.34.4: My files is Home, no Home row under it 2026-12-02 08:56:12 +00:00
SPEC.md 0.34.4: My files is Home, no Home row under it 2026-12-02 08:56:12 +00:00
vitest.config.mjs Scaffold plugin from bulwarkmail/plugins plugin-template 2026-11-26 08:28:08 +00:00

bulwark-sftpgo (Drive)

A Bulwark Mail plugin for SFTPGo.

Scaffolded from the official plugin-template. See SPEC.md and CHANGELOG.md.

Status: 0.30.0 on konbi's dev server (2026-11-30). Attaching, saving, sharing, the Drive app and its editors work; 1.0.0 isn't released (SPEC.md §10). English and German.

Connecting

In konbi's stack there is nothing to connect: Bulwark gets each person's key by itself the first time they open Drive (members of files).

Elsewhere, turn the admin setting Connect by signing in off: Connect in the Drive app then asks for an API key an admin issued. The sign-in flow of SPEC §4 v1.5 needs a service konbi no longer runs.

Drive has no personal settings, and no page in the webmail's Settings (SPEC F1).

The key goes in the X-API-Key header, because Bulwark only lets a plugin credential use a few header names. SFTPGo expects X-SFTPGO-API-KEY, so the reverse proxy in front of SFTPGo renames it (see stack/caddy/Caddyfile in konbi/infra). This step goes away once Bulwark accepts the SFTPGo header.

Using it

  • Attach > From SFTPGo in the composer: tick files, Attach copies. Files over 24 MB are greyed out: send those as share links.

  • Save to SFTPGo in an attachment's More actions menu, and Save message to SFTPGo in the open message's toolbar (saved as <subject>.eml). Pick a folder or make one; an existing name gets " (2)". The notification links to the folder.

  • Share links: Share as links… in the picker puts a "Files shared with SFTPGo" block in the message; Share link… in the app (file or folder). Password (generated) and an end date 14 days ahead, both changeable in the dialog. Links in the app's menu lists share and upload links: copy, open, revoke.

  • Request files… in the composer's Options menu: a new folder and an upload link for it go in the message. Whoever gets it can drop files there, without seeing what's inside.

  • Large attachments: from 10 MB, Bulwark offers to put the file in SFTPGo (Mail attachments/<date>/) and add a link instead. Up to 100 MB.

  • SFTPGo in the app bar: an app like Contacts, with a left menu (Home with its folders as a tree, Share links, Upload links) and a URL for every place. Upload (button or drop; on phones a round button at the bottom right), new folder, rename, delete, download, attach to a new message.

  • Reading pane, as in Mail: select a file that can be previewed or edited and it opens on the right (wide windows). Unsaved changes are asked about before you move on.

  • Shared folders (konbi only): drag a team's or project's folder into one of your own folders; the others see no change.

  • Projects (konbi Projects only): Create project on a folder, or Project: … on one that belongs to a project; saving an attachment from a project's email opens on its folder.

  • PDF: read in konbi's viewer (selectable text, search, links). No PDF tools since 0.33.0.

  • Documents: New document and Edit on .docx/.odt open EdenText inside the app; Save writes back to SFTPGo. Needs an EdenText (editorUrl, and its origin in frameOrigins).

  • Spreadsheets: New spreadsheet, and .xlsx/.xlsm files, open in open-xlsx-editor inside the app. Needs konbi draw 0.5.0 (drawUrl, and its origin in frameOrigins).

  • Command palette (Ctrl+K): "SFTPGo: Open files", "SFTPGo: Shares", and "SFTPGo: Connect" while not connected.

Develop

npm install
npm test          # unit tests (Vitest + jsdom)
npm run build     # bundle to dist/index.js
npm run package   # build and write bulwark-sftpgo.zip

Upload bulwark-sftpgo.zip under Admin → Plugins in Bulwark, with plugins turned on in the admin policy. In the konbi dev stack, scripts/install-plugins.py in konbi/infra does both and sets the SFTPGo server.

Layout

  • manifest.json: id, permissions, admin settings and translations
  • src/index.js: slots, hooks and activate, wired to the host API
  • src/lib/: plugin logic (SFTPGo client, errors, paths, connection)
  • src/ui/: slots, built with the host's UI kit (@plugin-host/ui)
  • test/: unit tests, run against a fake api
  • test-utils/: the fake api and UI kit stand-in, copied from bulwarkmail/plugins

The full plugin API is documented in WRITING_PLUGINS.md.

License

AGPL-3.0, like the template it is based on. Parts of src/lib and src/ui follow Bulwark's Nextcloud plugin (AGPL-3.0); the files say which.