// PART 05
Mail and channels
Mail and the external channels are where the platform reaches users outside the browser. Infrastructure credentials come from Vault; channel credentials live in the bot’s config.csv.
Mail — Stalwart
The bundled mail server is Stalwart 0.15.5 (component email), providing
SMTP and IMAP with TLS. In production containers it answers on 25/587 (SMTP,
submission) and 993 (IMAPS); DKIM, SPF and DMARC records are published in the
domain’s DNS (selector._domainkey.<domain> TXT).
Chat SEND MAIL resolves its relay in this order: gbo/{bot_id}/email →
gbo/email → the MAIL_HOST/MAIL_PORT/MAIL_USER/MAIL_PASS/MAIL_FROM
environment variables. Fields: smtp_host, smtp_port, smtp_user,
smtp_password, smtp_from and the optional smtp_tls. Without smtp_tls,
port 465 uses implicit TLS, every other port STARTTLS, and a loopback host
talks plaintext; smtp_tls accepts starttls, implicit or none. When a
field is missing the keyword answers in the conversation with the field
names instead of sending or pretending to save a draft — the same contract
the chat action mail.send follows, so a chat request cannot report a
completed send that never happened.
Channel configuration
| Category | Services | Configuration location |
|---|---|---|
| LLM providers | OpenAI, Groq, Anthropic, Azure OpenAI | Vault gbo/llm + config.csv |
| Messaging channels | WhatsApp, Teams, Instagram, Telegram | config.csv |
| Weather | OpenWeatherMap | config.csv (weather-api-key) |
| Storage / database / cache | OtterIO, PostgreSQL, Valkey | Vault (automatic) |
| Directory | Zitadel | VAULT_* environment variables |
| Stalwart / IMAP+SMTP | Vault (automatic) |
All service credentials referenced by a bot live in config.csv within the
bot’s .gbot folder — never hardcoded in scripts — with sensitive values as
vault:path/key references.
BASIC keywords that call external services
| Keyword | Service | Config key |
|---|---|---|
LLM |
LLM provider | llm-provider, llm-key |
WEATHER |
OpenWeatherMap | weather-api-key |
SEND MAIL |
SMTP relay | Vault gbo/email (above) |
TALK (channel reply), POST /api/whatsapp/send |
WhatsApp Cloud API | Vault whatsapp_api_key, config.csv whatsapp-phone-number-id |
SEND TEAMS |
Microsoft Teams | teams-app-id, teams-app-password |
SEND INSTAGRAM |
Instagram Graph API | instagram-access-token, instagram-page-id |
GET (http/https URL) |
any HTTP endpoint | — |
IMAGE / VIDEO / AUDIO / SEE |
BotModels (local) | botmodels-enabled, botmodels-url |
FIND |
Qdrant (local) | internal service |
USE WEBSITE |
web crawling | — |
Inbound webhooks fail closed
Every inbound channel webhook verifies its origin and refuses deliveries when
its secret is unset (gate webhook-auth, #2142 in the production-readiness
program). A channel that suddenly stops receiving messages is therefore often
a missing or expired secret in Vault, not a network fault: check the
verification logs before the firewall.