Skip to content

Per-domain SMTP gateway (smart-host) configuration - #96

Open
gott-alexander wants to merge 1 commit into
grommunio:masterfrom
gott-alexander:feature/per-domain-smtp-gateway
Open

Per-domain SMTP gateway (smart-host) configuration#96
gott-alexander wants to merge 1 commit into
grommunio:masterfrom
gott-alexander:feature/per-domain-smtp-gateway

Conversation

@gott-alexander

Copy link
Copy Markdown

Adds the grommunio-admin API surface for the per-domain SMTP-gateway table that gromox reads at SMTP delivery time.

Changes:

  • New SQL migration sql/001-domain-smtp-gateway.sql that creates the domain_smtp_gateway table (one row per domain) and an index on enabled. Compatible with MariaDB 10.5+ and MySQL 8+.
  • New ORM model orm.domain_smtp_gateway.DomainSmtpGateway registered in orm/__init__.py.
  • New REST endpoint mounted at
    GET /api/v1/domains/<id>/smtpGateway
    PUT /api/v1/domains/<id>/smtpGateway
    DELETE /api/v1/domains/<id>/smtpGateway
    The endpoint re-emits the gromox config-reload signal so the
    lookup table is picked up without restarting the daemons.
  • New CLI subcommand
    grommunio-admin domain smtp-gateway {set,show,delete,list}
    for headless configuration. Passwords are masked in show and
    list output.
  • OpenAPI 3 spec updated: /domains/{domainID}/smtpGateway path,
    domainSmtpGateway / domainSmtpGatewayWrite schemas.
  • res/openapi.json regenerated from openapi.yaml.

Companion changes: grommunio/gromox# (service registry + cu_send_mail integration) and grommunio/admin-web# (SMTP-gateway tab in the domain details).

This involves several repositories. It's probably not bug-free. It still needs testing and others to continue working on it, since I don't have the time.

It's already possible to send an email via the web interface using the SMTP gateway in the background (most of the time).

Adds the grommunio-admin API surface for the per-domain SMTP-gateway
table that gromox reads at SMTP delivery time.

Changes:

  * New SQL migration `sql/001-domain-smtp-gateway.sql` that creates
    the `domain_smtp_gateway` table (one row per domain) and an
    index on `enabled`. Compatible with MariaDB 10.5+ and MySQL 8+.
  * New ORM model `orm.domain_smtp_gateway.DomainSmtpGateway`
    registered in `orm/__init__.py`.
  * New REST endpoint mounted at
    `GET    /api/v1/domains/<id>/smtpGateway`
    `PUT    /api/v1/domains/<id>/smtpGateway`
    `DELETE /api/v1/domains/<id>/smtpGateway`
    The endpoint re-emits the gromox config-reload signal so the
    lookup table is picked up without restarting the daemons.
  * New CLI subcommand
    `grommunio-admin domain smtp-gateway {set,show,delete,list}`
    for headless configuration. Passwords are masked in `show` and
    `list` output.
  * OpenAPI 3 spec updated: `/domains/{domainID}/smtpGateway` path,
    `domainSmtpGateway` / `domainSmtpGatewayWrite` schemas.
  * `res/openapi.json` regenerated from `openapi.yaml`.

Companion changes: grommunio/gromox#<PR> (service registry +
`cu_send_mail` integration) and grommunio/admin-web#<PR>
(SMTP-gateway tab in the domain details).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant