docker-postfix/helm/mail/templates/configmap.yaml
2023-10-27 16:02:32 +02:00

30 lines
982 B
YAML

{{- $chart := "mail" -}}
{{- $fullName := include (print $chart ".fullname") . -}}
{{- $labels := include (print $chart ".labels") . -}}
{{- $files := .Files -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $fullName }}
labels:
{{- $labels | nindent 4 }}
data:
{{- with .Values.config.general }}{{ toYaml . | nindent 2 }}{{ end }}
{{- range $key, $value := .Values.config.postfix }}
POSTFIX_{{ $key }}: {{ $value | quote }}
{{- end }}
{{- range $key, $value := .Values.config.opendkim }}
OPENDKIM_{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.certs.create }}
_enable_tls.sh: |
#!/usr/bin/env bash
set -e
do_postconf -e 'smtp_use_tls=yes'
do_postconf -e 'smtp_tls_note_starttls_offer=yes'
do_postconf -e 'smtpd_use_tls=yes'
do_postconf -e 'smtpd_tls_note_starttls_offer=yes'
do_postconf -e 'smtpd_tls_cert_file=/var/run/certs/tls.crt'
do_postconf -e 'smtpd_tls_key_file=/var/run/certs/tls.key'
{{- end }}