You've already forked Mailu
mirror of
https://github.com/Mailu/Mailu.git
synced 2025-07-15 01:24:34 +02:00
Update fetchmail to selfbuilt 7.0.0-alpha
Fetchmail in alpine is ~5 years old — and doesn’t support current SSL/TLS variants anymore. This especially leads to our own fetchmail not being able to pull mail from mailu itself. Since no new fetchmail release is on the horizon, let’s build the lastest distribution artifact — which strangely is not 6.4.0-snapshot, but 7.0.0-alpha — ourselves.
This commit is contained in:
@ -1,13 +1,30 @@
|
|||||||
|
# First stage: Build
|
||||||
|
FROM alpine:3.8 as builder
|
||||||
|
|
||||||
|
# build dependencies
|
||||||
|
RUN apk add --no-cache curl tar xz autoconf git gettext build-base openssl openssl-dev
|
||||||
|
|
||||||
|
RUN curl 'https://netcologne.dl.sourceforge.net/project/fetchmail/branch_6.3/fetchmail-7.0.0-alpha6.tar.xz' | tar xJ
|
||||||
|
RUN cd fetchmail-7.0.0-alpha6 && \
|
||||||
|
./configure --with-ssl --prefix /usr/local --disable-nls && \
|
||||||
|
make
|
||||||
|
|
||||||
FROM alpine:3.8
|
FROM alpine:3.8
|
||||||
|
|
||||||
|
|
||||||
# python3 shared with most images
|
# python3 shared with most images
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
python3 py3-pip bash \
|
python3 py3-pip bash \
|
||||||
&& pip3 install --upgrade pip
|
&& pip3 install --upgrade pip
|
||||||
|
|
||||||
# Image specific layers under this line
|
# Image specific layers under this line
|
||||||
RUN apk add --no-cache fetchmail ca-certificates \
|
RUN apk add --no-cache ca-certificates openssl \
|
||||||
&& pip3 install requests
|
&& pip3 install requests
|
||||||
|
|
||||||
|
COPY --from=builder /fetchmail-7.0.0-alpha6/fetchmail /usr/local/bin
|
||||||
COPY fetchmail.py /fetchmail.py
|
COPY fetchmail.py /fetchmail.py
|
||||||
|
|
||||||
|
RUN adduser -D fetchmail
|
||||||
USER fetchmail
|
USER fetchmail
|
||||||
|
|
||||||
CMD ["/fetchmail.py"]
|
CMD ["/fetchmail.py"]
|
||||||
|
@ -22,7 +22,6 @@ poll "{host}" proto {protocol} port {port}
|
|||||||
is "{user_email}"
|
is "{user_email}"
|
||||||
smtphost "{smtphost}"
|
smtphost "{smtphost}"
|
||||||
{options}
|
{options}
|
||||||
sslproto 'AUTO'
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
@ -54,7 +53,7 @@ def run(debug):
|
|||||||
for fetch in fetches:
|
for fetch in fetches:
|
||||||
fetchmailrc = ""
|
fetchmailrc = ""
|
||||||
options = "options antispam 501, 504, 550, 553, 554"
|
options = "options antispam 501, 504, 550, 553, 554"
|
||||||
options += " ssl" if fetch["tls"] else ""
|
options += " sslmode wrapped" if fetch["tls"] else ""
|
||||||
options += " keep" if fetch["keep"] else " fetchall"
|
options += " keep" if fetch["keep"] else " fetchall"
|
||||||
fetchmailrc += RC_LINE.format(
|
fetchmailrc += RC_LINE.format(
|
||||||
user_email=escape_rc_string(fetch["user_email"]),
|
user_email=escape_rc_string(fetch["user_email"]),
|
||||||
|
1
towncrier/newsfragments/891.feature
Normal file
1
towncrier/newsfragments/891.feature
Normal file
@ -0,0 +1 @@
|
|||||||
|
Update Fetchmail to 7.0.0, which features more current SSL support
|
Reference in New Issue
Block a user