# VM112 — Wizard Onboard + Carbonio Mail

| Item | Valor |
|------|-------|
| **IP LAN** | `10.10.10.112` |
| **SSH WAN** | `95.216.14.146:2512` |
| **Hostname** | vm112-mail-ibytera |
| **URLs** | `onboard.ligbox.com.br` · API `:8090` |

## Papel

- Wizard onboarding clientes
- Carbonio mail tenants
- Webhooks → VM122 Desk
- Purge domínio / orquestração DNS (Spec 017, 026)

## No repo Git (CT130)

```
deploy/vm112-spec022/          # Carbonio account scripts
deploy/vm112-wizard/           # Patches wizard (Spec 037 V4 DNS Viewer) · **mail-bundle Spec 043**
deploy/vm112-wizard-security/  # CSP, webhooks, audit
docs/EMAIL_LIGBOX_VM112.md
specs/001-webhook-vm112-integration/
specs/017-vm112-domain-orchestration/
specs/022-carbonio-account-exists-release/
specs/025-wizard-onboarding-continuity/
specs/026-purge-traefik-validation/
specs/034-nextcloud-carbonio-vm112-integration/
specs/037-dns-multi-cloudflare-orchestration/  # DNS Viewer V4 wizard
```

## Deploy na VM112

```bash
git clone https://git.spec.ligbox.com.br/ligbox/ligbox-ops-platform.git
# Copiar deploy/vm112-* para paths locais — ver README em cada pasta
```

### DNS Viewer V4 (Spec 037 — pendente)

Painel read-only no passo DNS — **sem página nova**. Runbook:

```
deploy/vm112-wizard/DNS-VIEWER-V4.md
deploy/vm112-wizard/onboarding-dns-viewer-v4.patch.py
deploy/vm112-wizard/frontend-dns-viewer-v4.patch.py
```

Env obrigatório: `DESK_API_URL`, `OPS_INTERNAL_TOKEN` (igual Desk VM122).

### Mail-bundle Spec 043 ✅ (deploy 2026-07-01)

Endpoint interno para Desk activar domínio Carbonio + conta admin após FOSS order:

```
POST /api/internal/provision/mail-bundle
GET  /api/internal/provision/mail-bundle/{domain}
```

Runbook:

```
deploy/vm112-wizard/MAIL-BUNDLE-DEPLOY.md
deploy/vm112-wizard/deploy-mail-bundle-vm112.py
specs/043-desk-client-activation-sync/contracts/mail-bundle-api.md
```

Auth: header `X-Ops-Internal-Token` (= `OPS_INTERNAL_TOKEN` Desk VM122, em `/opt/ligbox-deploy/env/.env`).

**Teste validado:** domínio `bundle-novo-spec043.ligbox.com.br` → HTTP 200 `provisioned: true`.

**Webmail gate (`company_gate`):** [043 webmail-release-gate.md](../specs/043-desk-client-activation-sync/contracts/webmail-release-gate.md) — aviso rodapé login Carbonio + liberar em Painel `/admin` (UI card pendente).

## Integração

- **→ VM122:** webhooks `onboarding.*` · Assist/takeover API
- **→ CT114:** Traefik routers mail/onboard · `files.{dom}` (Spec 034)
- **→ VM124:** IMAP/SMTP (Nextcloud Mail app) · OCS provisioning (Spec 034)
- **← Desk:** purge, DNS revalidate, assist actions
