Skip to content

[BUG] - PORTS environment variable empty in mailu-envvars ConfigMap #548

@ggueret

Description

@ggueret

Describe the bug

The mailu-envvars ConfigMap doesn't set the PORTS variable, leaving it empty. This causes issues with the admin UI when viewing domain details (see Mailu/Mailu#3944 for the related core fix).

To Reproduce

  1. Deploy Mailu using the Helm chart with default values
  2. Check the ConfigMap: kubectl get cm mailu-envvars -n mail -o jsonpath='{.data.PORTS}'
  3. Observe the value is empty
  4. Go to Admin UI > Domain > Details
  5. See Internal Server Error (if running Mailu < 2024.06.45) or missing port information

Expected behavior

PORTS should be populated with the list of enabled mail ports (e.g., 25,465,587,143,993), derived from front.externalService.ports configuration.

Environment (please complete the following information):

  • Helm Chart Version: 2.1.0
  • Helm Version: v3.16.3
  • Kubernetes Version: v1.31.4+k3s1
  • Kubernetes Platform: K3s
  • Mailu Version: 2024.06

Values.yaml Configuration

domain: domain.tld
hostnames:
  - mail.domain.tld

ingress:
  enabled: false

front:
  hostPort:
    enabled: false
  externalService:
    enabled: false

Additional information

Workaround:

kubectl patch cm mailu-envvars -n mail --type merge -p '{"data":{"PORTS":"25,465,587,143,993"}}'
kubectl rollout restart deploy/mailu-admin -n mail

Suggested fix: In the ConfigMap template, derive PORTS from enabled front.externalService.ports or add a dedicated Helm value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssues that are confirmed to be bugs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions