enable starttls and generate self-signed certificate
All checks were successful
ci/woodpecker/tag/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2024-12-21 14:22:39 +01:00
parent 81f57a53ce
commit 267a4954ab
4 changed files with 10 additions and 3 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
.*~
ENV
ENV.test
tmp/

View File

@ -12,7 +12,7 @@ ENV SMARTHOST_PASS=""
# ip addresses or networks to allow for relaying, separate multiple ones by semicolon
ENV RELAYNETS="127.0.0.1/32"
RUN apk add --no-cache exim m4
RUN apk add --no-cache exim m4 openssl
COPY exim.conf.m4 /etc/exim
COPY start.sh /etc/exim

View File

@ -22,7 +22,8 @@ primary_hostname = HOSTNAME
acl_smtp_rcpt = acl_check_rcpt
tls_advertise_hosts =
tls_certificate = /etc/exim/tls.crt
tls_privatekey = /etc/exim/tls.key
begin routers
smarthost_route:

View File

@ -1,4 +1,9 @@
#!/bin/sh
m4 exim.conf.m4 > exim.conf && exim -bd -q15m -v
openssl genpkey -algorithm RSA -out tls.key && \
openssl req -new -key tls.key -out tls.csr -subj "/C=DE/CN=$HOSTNAME" && \
openssl x509 -req -in tls.csr -signkey tls.key -out tls.crt -days 3650 && \
chown exim tls.key tls.crt && \
m4 exim.conf.m4 > exim.conf && \
exim -bd -q15m -v