2015-04-20 05:07:23 +00:00
|
|
|
#Dockerfile for a Postfix email relay service
|
2024-07-07 17:12:32 +00:00
|
|
|
FROM alpine:3
|
2015-04-20 05:07:23 +00:00
|
|
|
MAINTAINER Juan Luis Baptiste juan.baptiste@gmail.com
|
|
|
|
|
2020-03-23 04:17:24 +00:00
|
|
|
RUN apk update && \
|
2021-02-03 20:26:32 +00:00
|
|
|
apk add bash gawk cyrus-sasl cyrus-sasl-login cyrus-sasl-crammd5 mailx \
|
2021-04-27 21:44:39 +00:00
|
|
|
postfix && \
|
2024-07-07 17:12:32 +00:00
|
|
|
apk add make go pkgconfig libsecret libsecret-dev git gpg gpg-agent pass && \
|
2024-07-07 17:46:37 +00:00
|
|
|
apk add msmtp && \
|
2020-03-23 04:17:24 +00:00
|
|
|
rm -rf /var/cache/apk/* && \
|
|
|
|
mkdir -p /var/log/supervisor/ /var/run/supervisor/ && \
|
|
|
|
sed -i -e 's/inet_interfaces = localhost/inet_interfaces = all/g' /etc/postfix/main.cf
|
2018-05-09 05:02:59 +00:00
|
|
|
|
2024-07-07 17:12:32 +00:00
|
|
|
# Gpg for pass/pmb
|
|
|
|
RUN mkdir /root/.gnupg
|
|
|
|
#RUN echo "default-cache-ttl 34560000" >> /root/.gnupg/gpg-agent.conf
|
|
|
|
#RUN echo "max-cache-ttl 34560000" >> /root/.gnupg/gpg-agent.conf
|
|
|
|
RUN gpg-agent --daemon --batch --disable-scdaemon
|
|
|
|
RUN gpg --quick-gen-key --batch --passphrase '' pmbkey
|
|
|
|
RUN pass init pmbkey
|
|
|
|
|
2024-07-07 17:46:37 +00:00
|
|
|
COPY dotmsmtprc /root/.msmtprc
|
2015-04-20 05:07:23 +00:00
|
|
|
COPY run.sh /
|
|
|
|
RUN chmod +x /run.sh
|
2015-05-12 07:20:38 +00:00
|
|
|
RUN newaliases
|
2015-04-20 05:07:23 +00:00
|
|
|
|
2024-07-07 17:12:32 +00:00
|
|
|
# ProtonMailBridge
|
2024-07-07 17:46:37 +00:00
|
|
|
RUN git clone https://github.com/ProtonMail/proton-bridge.git pmb
|
|
|
|
WORKDIR pmb
|
2024-07-07 17:12:32 +00:00
|
|
|
RUN echo "BUILDING BRIDGE"
|
|
|
|
RUN make build-nogui
|
|
|
|
RUN rm -rf /root/.cache && rm -rf /root/go
|
|
|
|
|
2015-04-20 05:07:23 +00:00
|
|
|
EXPOSE 25
|
|
|
|
#ENTRYPOINT ["/run.sh"]
|
2019-11-29 10:44:46 +00:00
|
|
|
CMD ["/run.sh"]
|