Configure XWiki mail settings on both instances #167

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

Context

After the SMTP relay container is running (issue #2) and the App Password is set (issue #1), both XWiki instances need their mail preferences updated via the REST API.

Current state (confirmed via REST):

  • smtp_server = 127.0.0.1 (broken default — nothing listens inside the container)
  • smtp_port = null (defaults to 25)
  • admin_email = null
  • javamail_extra_props = null

Target settings for both instances

Property Value
smtp_server smtp (relay container name)
smtp_port 25
admin_email robert.allan.james@gmail.com
javamail_extra_props (leave blank — relay handles TLS/auth)

Update commands

Repeat for both instances (ports 8090 = .org, 8091 = .com):

for PORT in 8090 8091; do
  for PROP_VAL in 'smtp_server=smtp' 'smtp_port=25' 'admin_email=robert.allan.james@gmail.com'; do
    PROP=${PROP_VAL%%=*}
    VAL=${PROP_VAL#*=}
    curl -s -u rajames:March17# -X PUT \
      "http://localhost:${PORT}/rest/wikis/xwiki/spaces/XWiki/pages/XWikiPreferences/objects/XWiki.XWikiPreferences/0/properties/${PROP}" \
      -H 'Content-Type: application/xml' \
      -d "<property xmlns=\"http://www.xwiki.org\" name=\"${PROP}\"><value>${VAL}</value></property>"
    echo "${PORT}/${PROP} = ${VAL}"
  done
done

Acceptance

Use the XWiki admin Email test at:

  • https://starshipos-f18.org/?xpage=admin&category=mailSender (Send test email button)
  • https://starshipos-f18.com/?xpage=admin&category=mailSender

Test email arrives at robert.allan.james@gmail.com.

## Context After the SMTP relay container is running (issue #2) and the App Password is set (issue #1), both XWiki instances need their mail preferences updated via the REST API. Current state (confirmed via REST): - `smtp_server = 127.0.0.1` (broken default — nothing listens inside the container) - `smtp_port = null` (defaults to 25) - `admin_email = null` - `javamail_extra_props = null` ## Target settings for both instances | Property | Value | |----------|-------| | `smtp_server` | `smtp` (relay container name) | | `smtp_port` | `25` | | `admin_email` | `robert.allan.james@gmail.com` | | `javamail_extra_props` | _(leave blank — relay handles TLS/auth)_ | ## Update commands Repeat for both instances (ports 8090 = .org, 8091 = .com): ```bash for PORT in 8090 8091; do for PROP_VAL in 'smtp_server=smtp' 'smtp_port=25' 'admin_email=robert.allan.james@gmail.com'; do PROP=${PROP_VAL%%=*} VAL=${PROP_VAL#*=} curl -s -u rajames:March17# -X PUT \ "http://localhost:${PORT}/rest/wikis/xwiki/spaces/XWiki/pages/XWikiPreferences/objects/XWiki.XWikiPreferences/0/properties/${PROP}" \ -H 'Content-Type: application/xml' \ -d "<property xmlns=\"http://www.xwiki.org\" name=\"${PROP}\"><value>${VAL}</value></property>" echo "${PORT}/${PROP} = ${VAL}" done done ``` ## Acceptance Use the XWiki admin **Email** test at: - `https://starshipos-f18.org/?xpage=admin&category=mailSender` (Send test email button) - `https://starshipos-f18.com/?xpage=admin&category=mailSender` Test email arrives at `robert.allan.james@gmail.com`.
rajames added this to the v4.0.0-alpha.5: SDK milestone 2026-11-11 17:10:39 +00:00
Sign in to join this conversation.