Add SMTP relay container for outbound mail #166

Open
opened 2026-11-11 17:10:35 +00:00 by rajames · 0 comments
Owner

Context

Both XWiki instances currently have smtp_server = 127.0.0.1 (the default) with nothing listening on port 25 inside the container, so no mail can be sent.

Port 587 and 465 to smtp.gmail.com are reachable from the VPS.

Task

Add a Postfix relay container (namshi/smtp) to docker-compose.yml on the internal network. All containers can then reach it at smtp:25 without needing their own TLS/auth config.

docker-compose.yml addition

  smtp:
    image: namshi/smtp
    container_name: strshipos-smtp
    restart: unless-stopped
    environment:
      - RELAY_HOST=smtp.gmail.com
      - RELAY_PORT=587
      - RELAY_USERNAME=robert.allan.james@gmail.com
      - RELAY_PASSWORD=${GMAIL_APP_PASSWORD}
    networks:
      - internal

.env addition

GMAIL_APP_PASSWORD=

(Leave blank until the App Password is generated — see issue #1.)

Acceptance

docker compose up -d smtp
docker exec strshipos-smtp postfix status

Container starts, Postfix is running.

## Context Both XWiki instances currently have `smtp_server = 127.0.0.1` (the default) with nothing listening on port 25 inside the container, so no mail can be sent. Port 587 and 465 to `smtp.gmail.com` are reachable from the VPS. ## Task Add a Postfix relay container (`namshi/smtp`) to `docker-compose.yml` on the `internal` network. All containers can then reach it at `smtp:25` without needing their own TLS/auth config. ### docker-compose.yml addition ```yaml smtp: image: namshi/smtp container_name: strshipos-smtp restart: unless-stopped environment: - RELAY_HOST=smtp.gmail.com - RELAY_PORT=587 - RELAY_USERNAME=robert.allan.james@gmail.com - RELAY_PASSWORD=${GMAIL_APP_PASSWORD} networks: - internal ``` ### .env addition ``` GMAIL_APP_PASSWORD= ``` (Leave blank until the App Password is generated — see issue #1.) ## Acceptance ``` docker compose up -d smtp docker exec strshipos-smtp postfix status ``` Container starts, Postfix is running.
rajames added this to the v4.0.0-alpha.5: SDK milestone 2026-11-11 17:10:35 +00:00
Sign in to join this conversation.