From 92e65b33e03ba0bc881db28a7412489c572b732e Mon Sep 17 00:00:00 2001 From: Dimitri Huisman Date: Wed, 10 Nov 2021 09:07:03 +0000 Subject: [PATCH] Configure fetchmail to use idfile to keep track of messages. Run fetchmail as root. This is unfortunately required because all files are owned by root in the mailu data folder. In the future we must switch all images to running all all processes with a non-root user. --- optional/fetchmail/Dockerfile | 5 +---- optional/fetchmail/fetchmail.py | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/optional/fetchmail/Dockerfile b/optional/fetchmail/Dockerfile index 0b3d4375..068a5dce 100644 --- a/optional/fetchmail/Dockerfile +++ b/optional/fetchmail/Dockerfile @@ -13,10 +13,7 @@ RUN apk add --no-cache fetchmail ca-certificates openssl \ && pip3 install requests RUN mkdir -p /data -RUN chown fetchmail:fetchmail /data COPY fetchmail.py /fetchmail.py -USER fetchmail - -CMD ["/fetchmail.py"] +CMD ["/fetchmail.py"] \ No newline at end of file diff --git a/optional/fetchmail/fetchmail.py b/optional/fetchmail/fetchmail.py index 3752c395..f3b65fc0 100755 --- a/optional/fetchmail/fetchmail.py +++ b/optional/fetchmail/fetchmail.py @@ -13,7 +13,7 @@ import traceback FETCHMAIL = """ fetchmail -N \ - --idfile /data/.fetchids \ + --idfile /data/.fetchids --uidl \ --sslcertck --sslcertpath /etc/ssl/certs \ -f {} """