Files
offlineimap/entrypoint.sh
Julien Cabillot 7baa12cf52
All checks were successful
perso/offlineimap/pipeline/head This commit looks good
feat: bump alpine 3.23
2026-03-18 17:47:20 -04:00

11 lines
539 B
Bash
Executable File

#!/bin/sh
set -o pipefail -o nounset -o errexit
# Récupère le fingerprint SHA1 du certificat fourni par le serveur
IMAP_CERT="$(echo | (openssl s_client -connect "${IMAP_SRV}:993" 2>/dev/null || true) | openssl x509 -fingerprint -sha1 -noout | cut -d'=' -f2 | sed 's/://g')"
sed -i'' "s/XXX_REPLACE_USER_XXX/${IMAP_USER}/g;s/XXX_REPLACE_PASS_XXX/${IMAP_PASS}/g;s/XXX_REPLACE_SRV_XXX/${IMAP_SRV}/g;s/XXX_REPLACE_FINGERPRINT_XXX/${IMAP_CERT}/g" "/home/offlineimap/.offlineimaprc"
exec offlineimap -c "/home/offlineimap/.offlineimaprc"