Fix for issue #1223

master
Dimitri Huisman 3 years ago
parent 56cbc56df7
commit 2404cf2e3d

@ -12,6 +12,9 @@ RUN apk add --no-cache \
RUN apk add --no-cache fetchmail ca-certificates openssl \ RUN apk add --no-cache fetchmail ca-certificates openssl \
&& pip3 install requests && pip3 install requests
RUN mkdir -p /data
RUN chown fetchmail:fetchmail /data
COPY fetchmail.py /fetchmail.py COPY fetchmail.py /fetchmail.py
USER fetchmail USER fetchmail

@ -13,6 +13,7 @@ import traceback
FETCHMAIL = """ FETCHMAIL = """
fetchmail -N \ fetchmail -N \
--idfile /data/.fetchids \
--sslcertck --sslcertpath /etc/ssl/certs \ --sslcertck --sslcertpath /etc/ssl/certs \
-f {} -f {}
""" """

@ -129,6 +129,8 @@ services:
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}fetchmail:${MAILU_VERSION:-{{ version }}} image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}fetchmail:${MAILU_VERSION:-{{ version }}}
restart: always restart: always
env_file: {{ env }} env_file: {{ env }}
volumes:
- "{{ root }}/fetchmail:/data"
{% if resolver_enabled %} {% if resolver_enabled %}
depends_on: depends_on:
- resolver - resolver

@ -110,7 +110,7 @@ services:
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}fetchmail:${MAILU_VERSION:-{{ version }}} image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}fetchmail:${MAILU_VERSION:-{{ version }}}
env_file: {{ env }} env_file: {{ env }}
volumes: volumes:
- "{{ root }}/data:/data" - "{{ root }}/fetchmail:/data"
deploy: deploy:
replicas: 1 replicas: 1
healthcheck: healthcheck:

@ -0,0 +1,4 @@
Fixed fetchmail losing track of fetched emails upon container recreation.
The relevant fetchmail files are now retained in the /data folder (in the fetchmail image).
See the docker-compose.yml file for the relevant volume mapping.
If you already had your own mapping, you must double check the volume mapping and take action.
Loading…
Cancel
Save