summaryrefslogtreecommitdiff
path: root/smtp/Dockerfile
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2026-01-08 21:10:08 +0000
committerJoe Carstairs <me@joeac.net>2026-01-08 21:10:08 +0000
commite0170e82aacf68aaf5d9896df9fdbea454e4725f (patch)
treee3daa47974a6d6ca342539df002ac03702aeb3e7 /smtp/Dockerfile
parent64f20921617835b33458fe911378ca27ee10055a (diff)
fixes SMTP server
Diffstat (limited to 'smtp/Dockerfile')
-rw-r--r--smtp/Dockerfile20
1 files changed, 15 insertions, 5 deletions
diff --git a/smtp/Dockerfile b/smtp/Dockerfile
index 093087a..4cdc095 100644
--- a/smtp/Dockerfile
+++ b/smtp/Dockerfile
@@ -1,13 +1,23 @@
FROM alpine:3.22
WORKDIR /
-RUN apk add --no-cache git autoconf automake build-base gettext gettext-dev gnutls-dev libtool make texinfo
-RUN git clone https://github.com/marlam/msmtp.git --branch msmtp-1.8.32 --single-branch --depth 1
+RUN mkdir -p /var/msmtp
+RUN apk --update --no-cache add git autoconf automake build-base gettext gettext-dev gnutls-dev libtool make texinfo && \
+ git clone https://github.com/marlam/msmtp.git --branch msmtp-1.8.32 --single-branch --depth 1
WORKDIR /msmtp
RUN autoreconf -fi && \
./configure && \
make && \
make install
-ARG PORT=2500
-EXPOSE $PORT
-CMD ["msmtpd", "--port=$PORT"]
+
+ARG LOCAL_SMTP_PORT
+EXPOSE $LOCAL_SMTP_PORT
+
+COPY .msmtprc ./
+
+CMD msmtpd \
+ --auth=$LOCAL_SMTP_USER,'echo $LOCAL_SMTP_PASSWORD' \
+ --command='msmtp -C .msmtprc -f %F --' \
+ --interface=0.0.0.0 \
+ --log=/var/msmtp/msmtpd.log \
+ --port=$LOCAL_SMTP_PORT