diff --git a/charts/mok/Chart.yaml b/charts/mok/Chart.yaml index 7ca8ae2328d1cf7f7544762681cac39d5573deca..39a06c2a47475a56bfcf5d43596e6fa1598fcc01 100644 --- a/charts/mok/Chart.yaml +++ b/charts/mok/Chart.yaml @@ -3,7 +3,7 @@ name: mok description: | Mail on Kubernetes (MoK) is a project to deploy a functional mailserver that runs without a database server on Kubernetes, taking advantage of configmaps and secret. type: application -version: 0.1.2 +version: 0.1.3 sources: - https://de.postfix.org/ftpmirror/index.html - https://github.com/dovecot/core diff --git a/charts/mok/README.md b/charts/mok/README.md index 92a5131735964ff86fe72478dfb082647e8b0270..aad2ed006b76ccfc03b7ce2d3f9f8804e638c464 100644 --- a/charts/mok/README.md +++ b/charts/mok/README.md @@ -1,6 +1,6 @@ # mok -  +  Mail on Kubernetes (MoK) is a project to deploy a functional mailserver that runs without a database server on Kubernetes, taking advantage of configmaps and secret. @@ -55,7 +55,7 @@ Mail on Kubernetes (MoK) is a project to deploy a functional mailserver that run | postfix.affinity | object | `{}` | | | postfix.image.pullPolicy | string | `"IfNotPresent"` | | | postfix.image.repository | string | `"quay.io/shivering-isles/postfix"` | postfix container image | -| postfix.image.tag | string | `"0.1.0"` | Overrides the image tag whose default is "latest" | +| postfix.image.tag | string | `"0.1.1"` | Overrides the image tag whose default is "latest" | | postfix.imagePullSecrets | list | `[]` | | | postfix.nodeSelector | object | `{}` | | | postfix.podAnnotations | object | `{}` | | diff --git a/charts/mok/templates/postfix.yaml b/charts/mok/templates/postfix.yaml index 3fb47c26b7ab978af41842f36c672aaf8e57b996..29da5d20ec4a7dae0ce074b20a083402298f1280 100644 --- a/charts/mok/templates/postfix.yaml +++ b/charts/mok/templates/postfix.yaml @@ -66,6 +66,9 @@ spec: {{- toYaml .Values.postfix.podSecurityContext | nindent 8 }} containers: - name: postfix + env: + - name: DOVECOT_SERVICE_NAME + value: {{ include "mok.fullname" . }}-dovecot-internal.{{ .Release.Namespace }}.svc.cluster.local image: {{ .Values.postfix.image.repository }}:{{.Values.postfix.image.tag | default "latest" }} imagePullPolicy: {{ .Values.postfix.image.pullPolicy }} lifecycle: diff --git a/charts/mok/values.yaml b/charts/mok/values.yaml index 63b7b95d59387b4740a726ee5fdf423744a3b047..b0cc7a10ce05e55cf560966345985b818da6e1c3 100644 --- a/charts/mok/values.yaml +++ b/charts/mok/values.yaml @@ -44,7 +44,7 @@ postfix: repository: quay.io/shivering-isles/postfix pullPolicy: IfNotPresent # -- Overrides the image tag whose default is "latest" - tag: "0.1.0" + tag: "0.1.1" imagePullSecrets: [] diff --git a/images/postfix/.gitlab-ci.yaml b/images/postfix/.gitlab-ci.yaml index e5b1b16bf760c06b29489922d4a06ffc698a2e15..4704343b8c731d3a18404c60e65dc4ca839be7c1 100644 --- a/images/postfix/.gitlab-ci.yaml +++ b/images/postfix/.gitlab-ci.yaml @@ -26,7 +26,7 @@ postfix-container-build-dev: - podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: - | - cd images/dovecot + cd images/postfix podman build --pull \ --label "org.opencontainers.image.source=$CI_PROJECT_URL/-/tree/$CI_COMMIT_SHA/images/postfix" \ --label "org.opencontainers.image.revision=$CI_COMMIT_SHA" \ diff --git a/images/postfix/.release b/images/postfix/.release index 85f180f38cd7bb8259cfadf2e12bfde62fc8f99d..30d50427739d190b6e70eb3a52e9718040f29ef2 100644 --- a/images/postfix/.release +++ b/images/postfix/.release @@ -1 +1 @@ -release=0.1.0 +release=0.1.1 diff --git a/images/postfix/config/master.cf b/images/postfix/config/master.cf index d978e1e9c20b1fb6e481df0323fa01faa515efe8..8c2e8ab8aa92bed5e07fc53995519b1b3e6b3ed3 100644 --- a/images/postfix/config/master.cf +++ b/images/postfix/config/master.cf @@ -111,10 +111,6 @@ submission inet n - y - - smtpd -o syslog_name=postfix/submission -o smtpd_tls_security_level=encrypt -o tls_preempt_cipherlist=yes - -o smtpd_sasl_type=dovecot - -o smtpd_sasl_path=inet:dovecot-internal:12345 - -o smtpd_sasl_security_options=noanonymous - -o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject -o smtpd_sender_login_maps=lmdb:/srv/tmp/sender-login-maps -o cleanup_service_name=headers-cleanup @@ -124,10 +120,6 @@ submissions inet n - y - - smtpd -o smtpd_tls_wrappermode=yes -o smtpd_tls_security_level=encrypt -o tls_preempt_cipherlist=yes - -o smtpd_sasl_type=dovecot - -o smtpd_sasl_path=inet:dovecot-internal:12345 - -o smtpd_sasl_security_options=noanonymous - -o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject -o smtpd_sender_login_maps=lmdb:/srv/tmp/sender-login-maps -o cleanup_service_name=headers-cleanup diff --git a/images/postfix/docker/start.sh b/images/postfix/docker/start.sh index 6285b6739939764d3ac6f4d5cfb7db6f9daf59cc..cec07c39b97a35513afea1a9cfe2841302a52ece 100644 --- a/images/postfix/docker/start.sh +++ b/images/postfix/docker/start.sh @@ -37,6 +37,10 @@ fi ## postconf -e "myhostname = $HOSTNAME" +if [ -n DOVECOT_SERVICE_NAME ]; then + postconf -e "smtpd_sasl_path = inet:${DOVECOT_SERVICE_NAME}:12345" + postconf -e "virtual_transport = lmtp:inet:${DOVECOT_SERVICE_NAME}:24" +fi cp /srv/virtual/* /srv/tmp find /srv/tmp -type f -exec postmap lmdb://{} \; @@ -45,6 +49,7 @@ find /srv/tmp -type f -exec postmap lmdb://{} \; ## Kube DNS Support ## +mkdir -p /var/spool/postfix/etc/ cp /etc/resolv.conf /var/spool/postfix/etc/ ########