diff --git a/Dockerfile b/Dockerfile index 56936f6..0e60e6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,8 +13,6 @@ RUN make build-nogui FROM alpine:edge ENV LANG C.UTF-8 -ENV SMTP_PORT 25 -ENV IMAP_PORT 143 COPY --from=build /usr/src/proton-bridge/Desktop-Bridge /bin/protonmail-bridge RUN apk add --no-cache \ libsecret \ @@ -27,5 +25,7 @@ COPY initproton /bin/ RUN chmod +x /bin/initproton COPY gpgparams /tmp/ WORKDIR /var/lib/proton +EXPOSE 25/tcp +EXPOSE 143/tcp ENTRYPOINT ["/bin/entrypoint"] CMD ["/bin/initproton"] diff --git a/entrypoint b/entrypoint index a77367e..6abe4c6 100755 --- a/entrypoint +++ b/entrypoint @@ -13,7 +13,7 @@ export HOME=/var/lib/proton # The ProtonMail Bridge expects connections from 127.0.0.1. Use socat to # redirect incoming connections to localhost. Also, this allows us to use # the default SMTP/IMAP ports. -socat TCP-LISTEN:$SMTP_PORT,fork TCP:127.0.0.1:1025 & -socat TCP-LISTEN:$IMAP_PORT,fork TCP:127.0.0.1:1143 & +socat TCP-LISTEN:25,fork TCP:127.0.0.1:1025 & +socat TCP-LISTEN:143,fork TCP:127.0.0.1:1143 & exec /sbin/su-exec proton "$@" \ No newline at end of file diff --git a/initproton b/initproton index d411fa3..7b7aeeb 100755 --- a/initproton +++ b/initproton @@ -3,8 +3,6 @@ set -eufo pipefail BRIDGE=/bin/protonmail-bridge PRINT_INFO=${PRINT_INFO:-""} -SMTP_PORT=${SMTP_PORT:-"25"} -IMAP_PORT=${IMAP_PORT:-"143"} #### INIT PASS_FILE=${PASS_FILE:-}