From 1ea1f7bf6ec3df6b2c5d06ce6150fb7528d3e29d Mon Sep 17 00:00:00 2001 From: Nick Pappas Date: Wed, 4 Sep 2024 19:08:47 -0500 Subject: [PATCH 1/8] fix(probes): rely on supervisorctl native exit codes for status The double-grep behavior led to the command unintentionally hanging in some cases, prompting k8s to continually restart the pod without valid reason. --- charts/docker-mailserver/templates/deployment.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/docker-mailserver/templates/deployment.yaml b/charts/docker-mailserver/templates/deployment.yaml index 2382179..9a65340 100644 --- a/charts/docker-mailserver/templates/deployment.yaml +++ b/charts/docker-mailserver/templates/deployment.yaml @@ -184,7 +184,7 @@ spec: command: - /bin/bash - -c - - supervisorctl status | grep -E "amavis|clamav|cron|dovecot|mailserver|opendkim|opendmarc|postfix|rsyslog" | grep RUNNING + - supervisorctl status amavis clamav cron dovecot mailserver opendkim opendmarc postfix rsyslog initialDelaySeconds: 10 timeoutSeconds: 5 failureThreshold: 3 @@ -193,7 +193,7 @@ spec: command: - /bin/bash - -c - - supervisorctl status | grep -E "mailserver|postfix" | grep RUNNING + - supervisorctl status mailserver postfix initialDelaySeconds: 10 timeoutSeconds: 5 failureThreshold: 3 From b4d3ea30a0bd723503276bc499e333d64b75da7f Mon Sep 17 00:00:00 2001 From: Nick Pappas Date: Wed, 4 Sep 2024 19:35:44 -0500 Subject: [PATCH 2/8] wip: reduce to minimum checks --- charts/docker-mailserver/templates/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/docker-mailserver/templates/deployment.yaml b/charts/docker-mailserver/templates/deployment.yaml index 9a65340..300a4a4 100644 --- a/charts/docker-mailserver/templates/deployment.yaml +++ b/charts/docker-mailserver/templates/deployment.yaml @@ -184,7 +184,7 @@ spec: command: - /bin/bash - -c - - supervisorctl status amavis clamav cron dovecot mailserver opendkim opendmarc postfix rsyslog + - supervisorctl status cron mailserver postfix rsyslog # - supervisorctl status amavis clamav cron dovecot mailserver opendkim opendmarc postfix rsyslog initialDelaySeconds: 10 timeoutSeconds: 5 failureThreshold: 3 From a91243da64d11acbbe73d15955c78a79cb8b864a Mon Sep 17 00:00:00 2001 From: Nick Pappas Date: Sat, 7 Sep 2024 13:01:31 -0500 Subject: [PATCH 3/8] chore(deployment): clean up simplified probes note: there is optional work remaining to conditionally add more services to liveness probe based on what the user has chosen to enable (or things that may perhaps always be runnig). --- charts/docker-mailserver/templates/deployment.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/charts/docker-mailserver/templates/deployment.yaml b/charts/docker-mailserver/templates/deployment.yaml index 300a4a4..30c4694 100644 --- a/charts/docker-mailserver/templates/deployment.yaml +++ b/charts/docker-mailserver/templates/deployment.yaml @@ -184,7 +184,8 @@ spec: command: - /bin/bash - -c - - supervisorctl status cron mailserver postfix rsyslog # - supervisorctl status amavis clamav cron dovecot mailserver opendkim opendmarc postfix rsyslog + - supervisorctl status cron mailserver postfix rsyslog + # TODO: conditionally? add 'amavis changedetector clamav cron dovecot fail2ban fetchmail mta-sts-daemon opendkim opendmarc postgrey postsrsd rspamd rspamd-redis saslauthd_ldap saslauthd_mysql saslauthd_pam saslauthd_rimap saslauthd_shadow' initialDelaySeconds: 10 timeoutSeconds: 5 failureThreshold: 3 From 59736a1af53af890d47f2e91b09e4e97393068c3 Mon Sep 17 00:00:00 2001 From: Nick Pappas Date: Tue, 3 Mar 2026 22:51:02 -0600 Subject: [PATCH 4/8] Increase initial delay and timeout for probes --- charts/docker-mailserver/templates/deployment.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/docker-mailserver/templates/deployment.yaml b/charts/docker-mailserver/templates/deployment.yaml index a32c762..ae1f0a4 100644 --- a/charts/docker-mailserver/templates/deployment.yaml +++ b/charts/docker-mailserver/templates/deployment.yaml @@ -186,18 +186,18 @@ spec: - /bin/bash - -c - supervisorctl status | grep -E "amavis|clamav|cron|dovecot|mailserver|opendkim|opendmarc|postfix|rsyslog" | grep RUNNING - initialDelaySeconds: 10 - timeoutSeconds: 5 - failureThreshold: 3 + initialDelaySeconds: 20 + timeoutSeconds: 10 + failureThreshold: 5 readinessProbe: exec: command: - /bin/bash - -c - supervisorctl status | grep -E "mailserver|postfix" | grep RUNNING - initialDelaySeconds: 10 - timeoutSeconds: 5 - failureThreshold: 3 + initialDelaySeconds: 20 + timeoutSeconds: 10 + failureThreshold: 5 ports: - name: smtp containerPort: 25 From c1b745f3afbdf5325c7b7da5d6c0491dacb17930 Mon Sep 17 00:00:00 2001 From: Nick Pappas Date: Tue, 3 Mar 2026 22:51:45 -0600 Subject: [PATCH 5/8] Increase readiness and liveness probe parameters --- charts/docker-mailserver/templates/deployment.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/docker-mailserver/templates/deployment.yaml b/charts/docker-mailserver/templates/deployment.yaml index 2aedcb3..eb074de 100644 --- a/charts/docker-mailserver/templates/deployment.yaml +++ b/charts/docker-mailserver/templates/deployment.yaml @@ -187,18 +187,18 @@ spec: - -c - supervisorctl status cron mailserver postfix rsyslog # TODO: conditionally? add 'amavis changedetector clamav cron dovecot fail2ban fetchmail mta-sts-daemon opendkim opendmarc postgrey postsrsd rspamd rspamd-redis saslauthd_ldap saslauthd_mysql saslauthd_pam saslauthd_rimap saslauthd_shadow' - initialDelaySeconds: 10 - timeoutSeconds: 5 - failureThreshold: 3 + initialDelaySeconds: 30 + timeoutSeconds: 15 + failureThreshold: 5 readinessProbe: exec: command: - /bin/bash - -c - supervisorctl status mailserver postfix - initialDelaySeconds: 10 - timeoutSeconds: 5 - failureThreshold: 3 + initialDelaySeconds: 30 + timeoutSeconds: 15 + failureThreshold: 5 ports: - name: smtp containerPort: 25 From 578f21f9a8bdad661e80f0c2fdabb306b6c505e9 Mon Sep 17 00:00:00 2001 From: Nick Pappas Date: Tue, 3 Mar 2026 22:56:08 -0600 Subject: [PATCH 6/8] Increase timeout and failure threshold for health check --- charts/docker-mailserver/templates/deployment.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/docker-mailserver/templates/deployment.yaml b/charts/docker-mailserver/templates/deployment.yaml index eb074de..1461376 100644 --- a/charts/docker-mailserver/templates/deployment.yaml +++ b/charts/docker-mailserver/templates/deployment.yaml @@ -197,8 +197,8 @@ spec: - -c - supervisorctl status mailserver postfix initialDelaySeconds: 30 - timeoutSeconds: 15 - failureThreshold: 5 + timeoutSeconds: 30 + failureThreshold: 10 ports: - name: smtp containerPort: 25 From e5cc9923eefaedaf2cbde3fcbddcfd847a255e57 Mon Sep 17 00:00:00 2001 From: Nick Pappas Date: Tue, 3 Mar 2026 23:09:07 -0600 Subject: [PATCH 7/8] Increase initial delay and timeout for probes --- charts/docker-mailserver/templates/deployment.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/docker-mailserver/templates/deployment.yaml b/charts/docker-mailserver/templates/deployment.yaml index 1461376..fe45442 100644 --- a/charts/docker-mailserver/templates/deployment.yaml +++ b/charts/docker-mailserver/templates/deployment.yaml @@ -187,8 +187,8 @@ spec: - -c - supervisorctl status cron mailserver postfix rsyslog # TODO: conditionally? add 'amavis changedetector clamav cron dovecot fail2ban fetchmail mta-sts-daemon opendkim opendmarc postgrey postsrsd rspamd rspamd-redis saslauthd_ldap saslauthd_mysql saslauthd_pam saslauthd_rimap saslauthd_shadow' - initialDelaySeconds: 30 - timeoutSeconds: 15 + initialDelaySeconds: 60 + timeoutSeconds: 60 failureThreshold: 5 readinessProbe: exec: @@ -196,8 +196,8 @@ spec: - /bin/bash - -c - supervisorctl status mailserver postfix - initialDelaySeconds: 30 - timeoutSeconds: 30 + initialDelaySeconds: 60 + timeoutSeconds: 60 failureThreshold: 10 ports: - name: smtp From 88864d4462856ebfd3c9c159ca8493bfee87ca02 Mon Sep 17 00:00:00 2001 From: Nick Pappas Date: Sun, 21 Jun 2026 09:54:06 +0900 Subject: [PATCH 8/8] fix: use new dms-healthcheck script fix: update test snapshots --- .../templates/deployment.yaml | 35 +++-- .../__snapshot__/deployment_test.yaml.snap | 129 ++++++++++++++++-- .../tests/__snapshot__/secret_test.yaml.snap | 129 ++++++++++++++++-- 3 files changed, 262 insertions(+), 31 deletions(-) diff --git a/charts/docker-mailserver/templates/deployment.yaml b/charts/docker-mailserver/templates/deployment.yaml index 52bd48a..83dc7c5 100644 --- a/charts/docker-mailserver/templates/deployment.yaml +++ b/charts/docker-mailserver/templates/deployment.yaml @@ -184,25 +184,30 @@ spec: {{- toYaml . | nindent 12 }} {{- end }} + # check every 10s for startup, 90s for pod restart + startupProbe: + exec: + command: + - dms-healthcheck + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 9 + # check every 30s for liveness, 90s for pod restart livenessProbe: exec: - command: - - /bin/bash - - -c - - supervisorctl status cron mailserver postfix rsyslog - # TODO: conditionally? add 'amavis changedetector clamav cron dovecot fail2ban fetchmail mta-sts-daemon opendkim opendmarc postgrey postsrsd rspamd rspamd-redis saslauthd_ldap saslauthd_mysql saslauthd_pam saslauthd_rimap saslauthd_shadow' - initialDelaySeconds: 60 - timeoutSeconds: 60 - failureThreshold: 5 + command: + - dms-healthcheck + periodSeconds: 30 + timeoutSeconds: 5 + failureThreshold: 3 + # check every 10s for readiness, 30s for service removal readinessProbe: exec: - command: - - /bin/bash - - -c - - supervisorctl status mailserver postfix - initialDelaySeconds: 60 - timeoutSeconds: 60 - failureThreshold: 10 + command: + - dms-healthcheck + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 3 ports: - name: smtp containerPort: 25 diff --git a/charts/docker-mailserver/tests/__snapshot__/deployment_test.yaml.snap b/charts/docker-mailserver/tests/__snapshot__/deployment_test.yaml.snap index fe51cd2..1239247 100644 --- a/charts/docker-mailserver/tests/__snapshot__/deployment_test.yaml.snap +++ b/charts/docker-mailserver/tests/__snapshot__/deployment_test.yaml.snap @@ -25,12 +25,30 @@ manifest should match snapshot: spec: containers: - env: + - name: ACCOUNT_PROVISIONER + value: null - name: AMAVIS_LOGLEVEL value: "0" + - name: CLAMAV_MESSAGE_SIZE_LIMIT + value: null + - name: DEFAULT_RELAY_HOST + value: null + - name: DMS_VMAIL_GID + value: null + - name: DMS_VMAIL_UID + value: null + - name: DOVECOT_AUTH_BIND + value: null - name: DOVECOT_INET_PROTOCOLS value: all - name: DOVECOT_MAILBOX_FORMAT value: maildir + - name: DOVECOT_PASS_FILTER + value: null + - name: DOVECOT_TLS + value: null + - name: DOVECOT_USER_FILTER + value: null - name: ENABLE_AMAVIS value: "0" - name: ENABLE_CLAMAV @@ -45,12 +63,16 @@ manifest should match snapshot: value: "0" - name: ENABLE_IMAP value: "1" + - name: ENABLE_MANAGESIEVE + value: null - name: ENABLE_OPENDKIM value: "0" - name: ENABLE_OPENDMARC value: "0" - name: ENABLE_POLICYD_SPF value: "0" + - name: ENABLE_POP3 + value: null - name: ENABLE_POSTGREY value: "0" - name: ENABLE_QUOTAS @@ -77,22 +99,56 @@ manifest should match snapshot: value: "300" - name: GETMAIL_POLL value: "5" + - name: LDAP_QUERY_FILTER_ALIAS + value: null + - name: LDAP_QUERY_FILTER_DOMAIN + value: null + - name: LDAP_QUERY_FILTER_GROUP + value: null + - name: LDAP_QUERY_FILTER_USER + value: null + - name: LDAP_SEARCH_BASE + value: null + - name: LDAP_SERVER_HOST + value: null + - name: LDAP_START_TLS + value: null - name: LOGROTATE_COUNT value: "4" - name: LOGROTATE_INTERVAL value: weekly + - name: LOGWATCH_INTERVAL + value: null + - name: LOGWATCH_RECIPIENT + value: null + - name: LOGWATCH_SENDER + value: null - name: LOG_LEVEL value: info - name: MARK_SPAM_AS_READ value: "0" - name: MOVE_SPAM_TO_JUNK value: "1" + - name: NETWORK_INTERFACE + value: null - name: OVERRIDE_HOSTNAME value: mail.example.com - name: PERMIT_DOCKER value: none + - name: PFLOGSUMM_RECIPIENT + value: null + - name: PFLOGSUMM_SENDER + value: null + - name: PFLOGSUMM_TRIGGER + value: null + - name: POSTFIX_DAGENT + value: null - name: POSTFIX_INET_PROTOCOLS value: all + - name: POSTFIX_MAILBOX_SIZE_LIMIT + value: null + - name: POSTFIX_MESSAGE_SIZE_LIMIT + value: null - name: POSTFIX_REJECT_UNKNOWN_CLIENT_HOSTNAME value: "0" - name: POSTGREY_AUTO_WHITELIST_CLIENTS @@ -103,10 +159,20 @@ manifest should match snapshot: value: "35" - name: POSTGREY_TEXT value: Delayed by Postgrey + - name: POSTMASTER_ADDRESS + value: null - name: POSTSCREEN_ACTION value: enforce + - name: RELAY_HOST + value: null - name: RELAY_PORT value: "25" + - name: RELAY_USER + value: null + - name: REPORT_RECIPIENT + value: null + - name: REPORT_SENDER + value: null - name: RSPAMD_CHECK_AUTHENTICATED value: "0" - name: RSPAMD_GREYLISTING @@ -119,30 +185,72 @@ manifest should match snapshot: value: "0" - name: RSPAMD_NEURAL value: "0" + - name: SASLAUTHD_LDAP_AUTH_METHOD + value: null + - name: SASLAUTHD_LDAP_FILTER + value: null + - name: SASLAUTHD_LDAP_MECH + value: null + - name: SASLAUTHD_LDAP_PASSWORD_ATTR + value: null + - name: SASLAUTHD_LDAP_SEARCH_BASE + value: null + - name: SASLAUTHD_LDAP_SERVER + value: null + - name: SASLAUTHD_LDAP_START_TLS + value: null + - name: SASLAUTHD_LDAP_TLS_CACERT_DIR + value: null + - name: SASLAUTHD_LDAP_TLS_CACERT_FILE + value: null + - name: SASLAUTHD_LDAP_TLS_CHECK_PEER + value: null + - name: SASLAUTHD_MECHANISMS + value: null + - name: SASLAUTHD_MECH_OPTIONS + value: null - name: SA_KILL value: "10" - name: SA_TAG value: "2" - name: SA_TAG2 value: "6.31" + - name: SMTP_ONLY + value: null - name: SPAMASSASSIN_SPAM_TO_INBOX value: "1" - name: SPAM_SUBJECT value: '***SPAM*** ' + - name: SPOOF_PROTECTION + value: null + - name: SRS_EXCLUDE_DOMAINS + value: null + - name: SRS_SECRET + value: null - name: SRS_SENDER_CLASSES value: envelope_sender + - name: SSL_ALT_CERT_PATH + value: null + - name: SSL_ALT_KEY_PATH + value: null + - name: SUPERVISOR_LOGLEVEL + value: null + - name: TLS_LEVEL + value: null + - name: TZ + value: null - name: UPDATE_CHECK_INTERVAL value: 1d + - name: VIRUSMAILS_DELETE_DELAY + value: null image: mailserver/docker-mailserver:0.1.0 imagePullPolicy: IfNotPresent livenessProbe: exec: command: - - /bin/bash - - -c - - supervisorctl status | grep -E "amavis|clamav|cron|dovecot|mailserver|opendkim|opendmarc|postfix|rsyslog" | grep RUNNING + - dms-healthcheck failureThreshold: 3 - initialDelaySeconds: 10 + periodSeconds: 30 timeoutSeconds: 5 name: docker-mailserver ports: @@ -171,11 +279,9 @@ manifest should match snapshot: readinessProbe: exec: command: - - /bin/bash - - -c - - supervisorctl status | grep -E "mailserver|postfix" | grep RUNNING + - dms-healthcheck failureThreshold: 3 - initialDelaySeconds: 10 + periodSeconds: 10 timeoutSeconds: 5 resources: limits: @@ -189,6 +295,13 @@ manifest should match snapshot: securityContext: privileged: false readOnlyRootFilesystem: false + startupProbe: + exec: + command: + - dms-healthcheck + failureThreshold: 9 + periodSeconds: 10 + timeoutSeconds: 5 volumeMounts: - mountPath: /tmp/docker-mailserver/dovecot.cf name: dovecot-cf diff --git a/charts/docker-mailserver/tests/__snapshot__/secret_test.yaml.snap b/charts/docker-mailserver/tests/__snapshot__/secret_test.yaml.snap index 362acbb..aef42e7 100644 --- a/charts/docker-mailserver/tests/__snapshot__/secret_test.yaml.snap +++ b/charts/docker-mailserver/tests/__snapshot__/secret_test.yaml.snap @@ -25,12 +25,30 @@ manifest should match snapshot: spec: containers: - env: + - name: ACCOUNT_PROVISIONER + value: null - name: AMAVIS_LOGLEVEL value: "0" + - name: CLAMAV_MESSAGE_SIZE_LIMIT + value: null + - name: DEFAULT_RELAY_HOST + value: null + - name: DMS_VMAIL_GID + value: null + - name: DMS_VMAIL_UID + value: null + - name: DOVECOT_AUTH_BIND + value: null - name: DOVECOT_INET_PROTOCOLS value: all - name: DOVECOT_MAILBOX_FORMAT value: maildir + - name: DOVECOT_PASS_FILTER + value: null + - name: DOVECOT_TLS + value: null + - name: DOVECOT_USER_FILTER + value: null - name: ENABLE_AMAVIS value: "0" - name: ENABLE_CLAMAV @@ -45,12 +63,16 @@ manifest should match snapshot: value: "0" - name: ENABLE_IMAP value: "1" + - name: ENABLE_MANAGESIEVE + value: null - name: ENABLE_OPENDKIM value: "0" - name: ENABLE_OPENDMARC value: "0" - name: ENABLE_POLICYD_SPF value: "0" + - name: ENABLE_POP3 + value: null - name: ENABLE_POSTGREY value: "0" - name: ENABLE_QUOTAS @@ -77,22 +99,56 @@ manifest should match snapshot: value: "300" - name: GETMAIL_POLL value: "5" + - name: LDAP_QUERY_FILTER_ALIAS + value: null + - name: LDAP_QUERY_FILTER_DOMAIN + value: null + - name: LDAP_QUERY_FILTER_GROUP + value: null + - name: LDAP_QUERY_FILTER_USER + value: null + - name: LDAP_SEARCH_BASE + value: null + - name: LDAP_SERVER_HOST + value: null + - name: LDAP_START_TLS + value: null - name: LOGROTATE_COUNT value: "4" - name: LOGROTATE_INTERVAL value: weekly + - name: LOGWATCH_INTERVAL + value: null + - name: LOGWATCH_RECIPIENT + value: null + - name: LOGWATCH_SENDER + value: null - name: LOG_LEVEL value: info - name: MARK_SPAM_AS_READ value: "0" - name: MOVE_SPAM_TO_JUNK value: "1" + - name: NETWORK_INTERFACE + value: null - name: OVERRIDE_HOSTNAME value: mail.example.com - name: PERMIT_DOCKER value: none + - name: PFLOGSUMM_RECIPIENT + value: null + - name: PFLOGSUMM_SENDER + value: null + - name: PFLOGSUMM_TRIGGER + value: null + - name: POSTFIX_DAGENT + value: null - name: POSTFIX_INET_PROTOCOLS value: all + - name: POSTFIX_MAILBOX_SIZE_LIMIT + value: null + - name: POSTFIX_MESSAGE_SIZE_LIMIT + value: null - name: POSTFIX_REJECT_UNKNOWN_CLIENT_HOSTNAME value: "0" - name: POSTGREY_AUTO_WHITELIST_CLIENTS @@ -103,10 +159,20 @@ manifest should match snapshot: value: "35" - name: POSTGREY_TEXT value: Delayed by Postgrey + - name: POSTMASTER_ADDRESS + value: null - name: POSTSCREEN_ACTION value: enforce + - name: RELAY_HOST + value: null - name: RELAY_PORT value: "25" + - name: RELAY_USER + value: null + - name: REPORT_RECIPIENT + value: null + - name: REPORT_SENDER + value: null - name: RSPAMD_CHECK_AUTHENTICATED value: "0" - name: RSPAMD_GREYLISTING @@ -119,30 +185,72 @@ manifest should match snapshot: value: "0" - name: RSPAMD_NEURAL value: "0" + - name: SASLAUTHD_LDAP_AUTH_METHOD + value: null + - name: SASLAUTHD_LDAP_FILTER + value: null + - name: SASLAUTHD_LDAP_MECH + value: null + - name: SASLAUTHD_LDAP_PASSWORD_ATTR + value: null + - name: SASLAUTHD_LDAP_SEARCH_BASE + value: null + - name: SASLAUTHD_LDAP_SERVER + value: null + - name: SASLAUTHD_LDAP_START_TLS + value: null + - name: SASLAUTHD_LDAP_TLS_CACERT_DIR + value: null + - name: SASLAUTHD_LDAP_TLS_CACERT_FILE + value: null + - name: SASLAUTHD_LDAP_TLS_CHECK_PEER + value: null + - name: SASLAUTHD_MECHANISMS + value: null + - name: SASLAUTHD_MECH_OPTIONS + value: null - name: SA_KILL value: "10" - name: SA_TAG value: "2" - name: SA_TAG2 value: "6.31" + - name: SMTP_ONLY + value: null - name: SPAMASSASSIN_SPAM_TO_INBOX value: "1" - name: SPAM_SUBJECT value: '***SPAM*** ' + - name: SPOOF_PROTECTION + value: null + - name: SRS_EXCLUDE_DOMAINS + value: null + - name: SRS_SECRET + value: null - name: SRS_SENDER_CLASSES value: envelope_sender + - name: SSL_ALT_CERT_PATH + value: null + - name: SSL_ALT_KEY_PATH + value: null + - name: SUPERVISOR_LOGLEVEL + value: null + - name: TLS_LEVEL + value: null + - name: TZ + value: null - name: UPDATE_CHECK_INTERVAL value: 1d + - name: VIRUSMAILS_DELETE_DELAY + value: null image: mailserver/docker-mailserver:0.1.0 imagePullPolicy: IfNotPresent livenessProbe: exec: command: - - /bin/bash - - -c - - supervisorctl status | grep -E "amavis|clamav|cron|dovecot|mailserver|opendkim|opendmarc|postfix|rsyslog" | grep RUNNING + - dms-healthcheck failureThreshold: 3 - initialDelaySeconds: 10 + periodSeconds: 30 timeoutSeconds: 5 name: docker-mailserver ports: @@ -171,11 +279,9 @@ manifest should match snapshot: readinessProbe: exec: command: - - /bin/bash - - -c - - supervisorctl status | grep -E "mailserver|postfix" | grep RUNNING + - dms-healthcheck failureThreshold: 3 - initialDelaySeconds: 10 + periodSeconds: 10 timeoutSeconds: 5 resources: limits: @@ -189,6 +295,13 @@ manifest should match snapshot: securityContext: privileged: false readOnlyRootFilesystem: false + startupProbe: + exec: + command: + - dms-healthcheck + failureThreshold: 9 + periodSeconds: 10 + timeoutSeconds: 5 volumeMounts: - mountPath: /tmp/docker-mailserver/dovecot.cf name: dovecot-cf