mirror of
https://github.com/bokysan/docker-postfix.git
synced 2025-09-05 05:54:51 +08:00
* allow change of cert secret name * change to helpers.tpl * update secretName * fix certname * fix name of default * set static name * Removing comment * update Readme and set cert name as ${mail.fullname} * update test file name * add create * Removing the certs.existing. As this was not setup to be used. * Update to allow setting only existingSecret or certs.create * allow existing secret to add certs script --------- Co-authored-by: nicholasm <nicholas.matters@prontocloud.com.au>
29 lines
1,014 B
YAML
29 lines
1,014 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 or .Values.certs.create .Values.certs.existingSecret }}
|
|
_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 }}
|