77 lines
3.0 KiB
Markdown
77 lines
3.0 KiB
Markdown
# govoplan-mail
|
|
|
|
<!-- govoplan-repository-type:start -->
|
|
**Repository type:** module (domain).
|
|
<!-- govoplan-repository-type:end -->
|
|
|
|
GovOPlaN Mail is the mail transport module. It owns reusable SMTP/IMAP profile management, mail profile policy enforcement, mock mail infrastructure, and the mail WebUI package.
|
|
|
|
## Ownership
|
|
|
|
This repository owns:
|
|
|
|
- backend module manifest `mail`
|
|
- mail permissions such as `mail:profile:read`, `mail:profile:write`, `mail:profile:use`, `mail:profile:test`, and `mail:mailbox:read`
|
|
- SMTP/IMAP profile models, policy checks, encrypted credential storage, and profile resolution
|
|
- SMTP send and IMAP append adapters, including mock transports for development
|
|
- development mock mailbox endpoints used by test-send flows
|
|
- WebUI package `@govoplan/mail-webui` with profile management, policy management, and read-only mailbox components
|
|
|
|
Core owns auth, tenants, RBAC evaluation, database/session primitives, secret helpers, CSRF/API helpers, and shell layout.
|
|
|
|
## Credential inheritance policy
|
|
|
|
SMTP and IMAP each have one credential inheritance decision: descendants inherit profile credentials, may inherit profile credentials, or must provide local credentials. The lower-level override switch for `smtp_credentials.inherit` and `imap_credentials.inherit` decides whether child scopes may change that decision. There is no separate "override the override" credential policy field.
|
|
|
|
## Development
|
|
|
|
Install through the core environment:
|
|
|
|
```bash
|
|
cd /mnt/DATA/git/govoplan-core
|
|
./.venv/bin/python -m pip install -r requirements-dev.txt
|
|
```
|
|
|
|
Run the WebUI from the core host:
|
|
|
|
```bash
|
|
cd /mnt/DATA/git/govoplan-core/webui
|
|
PATH=/home/zemion/.nvm/versions/node/v22.22.3/bin:$PATH /home/zemion/.nvm/versions/node/v22.22.3/bin/npm run dev
|
|
```
|
|
|
|
## Module integration
|
|
|
|
Backend entry point:
|
|
|
|
```toml
|
|
[project.entry-points."govoplan.modules"]
|
|
mail = "govoplan_mail.backend.manifest:get_manifest"
|
|
```
|
|
|
|
Frontend package:
|
|
|
|
```text
|
|
@govoplan/mail-webui
|
|
```
|
|
|
|
The campaign module consumes `mail.campaign_delivery` for sending,
|
|
append-to-Sent behavior, profile selection, and policy checks. Mail does not
|
|
import campaign internals; campaign-scoped policy and owner context are resolved
|
|
through the core `campaigns.mailPolicyContext` capability when the campaign
|
|
module is installed.
|
|
|
|
Development mailbox routes are registered by the mail module only when the
|
|
core runtime is in `dev` mode and `dev_mailbox_api_enabled` is enabled. Core
|
|
does not contribute these routes directly.
|
|
|
|
POP3 and JMAP are deferred. The protocol decision is documented in
|
|
[docs/MAIL_PROTOCOL_ROADMAP.md](docs/MAIL_PROTOCOL_ROADMAP.md): stabilize
|
|
SMTP/IMAP first, prefer JMAP for modern mailbox sync/search later, and add POP3
|
|
only for explicit legacy-download requirements.
|
|
|
|
Platform RBAC and governance rules are documented in `govoplan-core/docs/`.
|
|
|
|
## Release packaging
|
|
|
|
The repository root includes a `package.json` for git-based WebUI installs. It exports the package `@govoplan/mail-webui` from `webui/src` so release builds can depend on tagged git refs instead of local `file:` paths.
|