nextcloud / helm

A community maintained helm chart for deploying Nextcloud on Kubernetes.
GNU Affero General Public License v3.0
295 stars 258 forks source link

Helm Chart not properly configuring SMTP_SECURE, SMTP_HOST, SMTP_USER, SMTP_PASS and SMTP_PORT #510

Closed Routhinator closed 5 months ago

Routhinator commented 5 months ago

Describe your Issue

When using the mail settings in the helm chart, many of the resulting values bound to the pods environment variables are defaults and not the configured settings.

The only ones that work properly are MAIL_DOMAIN, MAIL_FROM_ADDRESS and SMTP_AUTHTYPE.

Logs and Errors

Errors: Email sending does not work. Validating the configuration by inspecting the pod yaml makes the problem clear.

From the nextcloud pod (fetched with get pod -o=yaml)

    - name: MAIL_FROM_ADDRESS
      value: nextcloud
    - name: MAIL_DOMAIN
      value: private.com
    - name: SMTP_SECURE
      value: ssl
    - name: SMTP_PORT
      value: "465"
    - name: SMTP_AUTHTYPE
      value: LOGIN
    - name: SMTP_HOST
      valueFrom:
        secretKeyRef:
          key: smtp-host
          name: nextcloud
    - name: SMTP_NAME
      valueFrom:
        secretKeyRef:
          key: smtp-username
          name: nextcloud
    - name: SMTP_PASSWORD
      valueFrom:
        secretKeyRef:
          key: smtp-password
          name: nextcloud

From the nextcloud secret:

  smtp-host: ZG9tYWluLmNvbQ==
  smtp-password: cGFzcw==
  smtp-username: dXNlcg==

╭─ ~/projects/terraform

echo ZG9tYWluLmNvbQ== | base64 -d
domain.com%                                                                                                                                                                                                                          

╭─ ~/projects/terraform

echo cGFzcw== | base64 -d
pass%                                                                                                                                                                                                                                

╭─ ~/projects/terraform
echo dXNlcg== | base64 -d
user%   

From my values.yaml input:

nextcloud:
  mail:
    enabled: true
    fromAddress: nextcloud
    domain: private.com
    stmp:
      host: smtp.private.com
      secure: "NONE"
      port: "587"
      authtype:  LOGIN
      name: nextcloud@private.com
      password: <omitted>

Describe your Environment

nextcloud:
  mail:
    enabled: true
    fromAddress: nextcloud
    domain: private.com
    stmp:
      host: smtp.private.com
      secure: "NONE"
      port: "587"
      authtype:  LOGIN
      name: nextcloud@private.com
      password: <omitted>

Additional context, if any

Routhinator commented 5 months ago

Oi vey, typing smtp properly would help :facepalm: