This commit is contained in:
Joris Le Blansch 2026-07-28 14:59:56 +01:00 committed by GitHub
commit f6ad51a19c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 10 deletions

View file

@ -167,10 +167,10 @@ while true; do
DOVECOT_CERT_SERIAL_NEW="$(echo | openssl s_client -connect dovecot:143 -starttls imap 2>/dev/null | openssl x509 -inform pem -noout -serial | cut -d "=" -f 2)"
# Re-using previous acme-mailcow account and domain keys
if [[ ! -f ${ACME_BASE}/acme/key.pem ]]; then
log_f "Generating missing domain private rsa key..."
openssl genrsa 4096 > ${ACME_BASE}/acme/key.pem
log_f "Generating missing domain private key (ECDSA P-256)..."
openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-256 > ${ACME_BASE}/acme/key.pem
else
log_f "Using existing domain rsa key ${ACME_BASE}/acme/key.pem"
log_f "Using existing domain key ${ACME_BASE}/acme/key.pem"
fi
if [[ ! -f ${ACME_BASE}/acme/account.pem ]]; then
log_f "Generating missing Lets Encrypt account key..."
@ -352,7 +352,7 @@ while true; do
VALIDATED_CERTIFICATES+=("${CERT_NAME}")
# obtain server certificate if required
DOMAINS=${SERVER_SAN_VALIDATED[@]} /srv/obtain-certificate.sh rsa
DOMAINS=${SERVER_SAN_VALIDATED[@]} /srv/obtain-certificate.sh ecdsa
RETURN="$?"
if [[ "$RETURN" == "0" ]]; then # 0 = cert created successfully
CERT_AMOUNT_CHANGED=1
@ -394,7 +394,7 @@ while true; do
CERT_NAME=${VALIDATED_DOMAINS_SORTED[0]}
VALIDATED_CERTIFICATES+=("${CERT_NAME}")
# obtain certificate if required
DOMAINS=${VALIDATED_DOMAINS_SORTED[@]} /srv/obtain-certificate.sh rsa
DOMAINS=${VALIDATED_DOMAINS_SORTED[@]} /srv/obtain-certificate.sh ecdsa
RETURN="$?"
if [[ "$RETURN" == "0" ]]; then # 0 = cert created successfully
CERT_AMOUNT_CHANGED=1

View file

@ -22,8 +22,7 @@ fi
TYPE=${1}
PREFIX=""
# only support rsa certificates for now
if [[ "${TYPE}" != "rsa" ]]; then
if [[ "${TYPE}" != "rsa" && "${TYPE}" != "ecdsa" ]]; then
log_f "Unknown certificate type '${TYPE}' requested"
exit 5
fi

View file

@ -15,8 +15,7 @@ ACME_BASE=/var/lib/acme
TYPE=${1}
PREFIX=""
# only support rsa certificates for now
if [[ "${TYPE}" != "rsa" ]]; then
if [[ "${TYPE}" != "rsa" && "${TYPE}" != "ecdsa" ]]; then
log_f "Unknown certificate type '${TYPE}' requested"
exit 5
fi

View file

@ -465,7 +465,7 @@ services:
condition: service_started
unbound-mailcow:
condition: service_healthy
image: ghcr.io/mailcow/acme:1.97
image: ghcr.io/mailcow/acme:2.00
dns:
- ${IPV4_NETWORK:-172.22.1}.254
environment: