mirror of
https://github.com/bokysan/docker-postfix.git
synced 2024-09-20 14:56:10 +08:00
30 lines
982 B
YAML
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 }}
|