#391·openship

[Bug] Relay SMTP settings not applied to webmail container + logout redirects to 404

Author: farrasrayhandCreated Aug 2, 2026Updated Sep 16, 2026

Bug 1: Relay SMTP settings not applied to webmail container (still uses default port 465)

Description

After configuring SMTP relay (Brevo/custom) in the Emails → Sending tab, the webmail container still uses the default mail.example.com:465 instead of the configured relay settings.

Steps to Reproduce

  1. Install mail server via Openship
  2. Go to Emails → Sending
  3. Enable relay, set custom SMTP (e.g. Brevo smtp-relay.brevo.com:587)
  4. Save changes — UI shows "Relay active" ✅
  5. Go to Emails → Test → send test email

Expected Behavior

Test email should be sent via the configured relay (smtp-relay.brevo.com:587).

Actual Behavior

Error: SMTP submission check failed against mail.example.com:465: Connection timeout

Inspecting the webmail container environment variables confirms it still uses old defaults:

DEFAULT_SMTP_HOST=mail.example.com
DEFAULT_SMTP_PORT=465

Root Cause (suspected)

The webmail container is created with hardcoded default SMTP env vars and does not get recreated or updated when relay settings are changed via the UI. The relay config appears to be saved (UI shows "Relay active") but is not propagated to the webmail container's environment.

Workaround

Sending directly via swaks using Brevo credentials works fine, confirming the relay config itself is correct:

bash
swaks --to [email protected] \
      --from [email protected] \
      --server smtp-relay.brevo.com \
      --port 587 \
      --auth LOGIN \
      --auth-user YOUR_BREVO_LOGIN \
      --auth-password "YOUR_SMTP_KEY" \
      --tls

Output confirms successful delivery:

235 2.0.0 Authentication succeeded
250 2.0.0 OK: queued
221 2.0.0 Bye

Bug 2: Logout from webmail redirects to 404 (/mail/undefined/login)

Description

After logging out from the webmail interface, the user is redirected to an invalid URL containing undefined instead of the correct login path, resulting in a 404 Page Not Found error.

Steps to Reproduce

  1. Log in to the webmail interface at https://mail.example.com/mail
  2. Click logout
  3. Observe the redirect URL

Expected Behavior

User should be redirected to:

https://mail.example.com/mail/login

Actual Behavior

User is redirected to:

https://mail.example.com/mail/undefined/login

This results in a 404 Page Not Found error.

Workaround

Manually navigate to:

https://mail.example.com/mail

Or clear browser cookies and access the URL directly.


Environment

  • Openship version: 0.5.0
  • VPS: Oracle Cloud Free Tier (ARM64, Ubuntu 24.04 Noble)
  • Architecture: arm64
  • Browser: Chrome 151.0.0.0 (Linux x86_64)
  • Note: Oracle Cloud blocks outbound port 25 by default, hence the need for SMTP relay
  • Relay provider tested: Brevo (smtp-relay.brevo.com:587)