Files
offlineimap/entrypoint.sh
T

11 lines
539 B
Bash
Raw Normal View History

2018-03-19 16:42:28 +01:00
#!/bin/sh
set -o pipefail -o nounset -o errexit
2026-03-17 19:16:06 -04:00
# 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')"
2018-03-19 16:42:28 +01:00
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"
2026-03-17 19:16:06 -04:00
exec offlineimap -c "/home/offlineimap/.offlineimaprc"