1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-08-10 22:31:47 +02:00

Specify the CA path for fetchmail

This commit is contained in:
Pierre Jaury
2016-06-26 13:54:16 +02:00
parent aace1c2d78
commit 52070937f9
2 changed files with 9 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ FROM python:alpine
RUN apk add --update \
fetchmail \
ca-certificates \
&& rm -rf /var/cache/apk/*
COPY fetchmail.py /fetchmail.py

View File

@@ -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):