From 52070937f9c699f0f855032e1139390d119fbedd Mon Sep 17 00:00:00 2001 From: Pierre Jaury Date: Sun, 26 Jun 2016 13:54:16 +0200 Subject: [PATCH] Specify the CA path for fetchmail --- fetchmail/Dockerfile | 1 + fetchmail/fetchmail.py | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/fetchmail/Dockerfile b/fetchmail/Dockerfile index 4a1931f0..84926e19 100644 --- a/fetchmail/Dockerfile +++ b/fetchmail/Dockerfile @@ -2,6 +2,7 @@ FROM python:alpine RUN apk add --update \ fetchmail \ + ca-certificates \ && rm -rf /var/cache/apk/* COPY fetchmail.py /fetchmail.py diff --git a/fetchmail/fetchmail.py b/fetchmail/fetchmail.py index 9109ce33..72f942d8 100755 --- a/fetchmail/fetchmail.py +++ b/fetchmail/fetchmail.py @@ -6,6 +6,13 @@ import os import tempfile +FETCHMAIL = """ +fetchmail -N \ + --sslcertck --sslcertpath /etc/ssl/certs \ + -f {} +""" + + RC_LINE = """ poll {host} proto {protocol} port {port} user "{username}" password "{password}" @@ -19,7 +26,7 @@ def fetchmail(fetchmailrc): with tempfile.NamedTemporaryFile() as handler: handler.write(fetchmailrc.encode("utf8")) handler.flush() - os.system("fetchmail --sslcertck -N -f '{}'".format(handler.name)) + os.system(FETCHMAIL.format(handler.name)) def run(cursor):