2 Commits

Author SHA1 Message Date
267a4954ab 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
2024-12-21 14:22:39 +01:00
81f57a53ce fixes
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2024-12-21 13:43:41 +01:00
7 changed files with 11 additions and 14 deletions

View File

@ -13,12 +13,6 @@ steps:
dockerfile: Dockerfile dockerfile: Dockerfile
when: when:
- event: [push, tag] - event: [push, tag]
scan_image:
image: aquasec/trivy
commands:
- trivy image $FORGE_NAME/$CI_REPO:$CI_COMMIT_SHA --quiet --exit-code 1
when:
- event: [push, tag]
build: build:
image: plugins/kaniko image: plugins/kaniko
settings: settings:

View File

@ -12,7 +12,7 @@ ENV SMARTHOST_PASS=""
# ip addresses or networks to allow for relaying, separate multiple ones by semicolon # ip addresses or networks to allow for relaying, separate multiple ones by semicolon
ENV RELAYNETS="127.0.0.1/32" 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 exim.conf.m4 /etc/exim
COPY start.sh /etc/exim COPY start.sh /etc/exim

View File

@ -8,7 +8,7 @@ kubectl create secret generic smtp-secrets \
--from-literal=SMARTHOST="smtprelaypool.ispgateway.de" \ --from-literal=SMARTHOST="smtprelaypool.ispgateway.de" \
--from-literal=SMARTHOST_USER="pseudosmarthostuser@hottis.de" \ --from-literal=SMARTHOST_USER="pseudosmarthostuser@hottis.de" \
--from-literal=SMARTHOST_PASS="$SMARTHOST_PASSWORD" \ --from-literal=SMARTHOST_PASS="$SMARTHOST_PASSWORD" \
--from-literal=RELAY_NETWORKS=":10.0.0.0/8" | \ --from-literal=RELAYNETS=":10.0.0.0/8" | \
kubectl apply -n system -f - kubectl apply -n system -f -
kubectl apply -n system -f deploy.yml kubectl apply -n system -f deploy.yml

View File

@ -18,7 +18,7 @@ spec:
spec: spec:
containers: containers:
- name: smtp - name: smtp
image: quay.io/wollud1969/exim-docker:0.2.1 image: quay.io/wollud1969/exim-docker:0.2.2
envFrom: envFrom:
- secretRef: - secretRef:
name: smtp-secrets name: smtp-secrets

View File

@ -16,15 +16,14 @@ errprint(`Error: HOSTNAME not set')
m4exit(1) m4exit(1)
') ')
dnl ----------------------------------------------------------------
dnl template for exim.conf dnl template for exim.conf
primary_hostname = HOSTNAME primary_hostname = HOSTNAME
acl_smtp_rcpt = acl_check_rcpt acl_smtp_rcpt = acl_check_rcpt
tls_advertise_hosts = tls_certificate = /etc/exim/tls.crt
tls_privatekey = /etc/exim/tls.key
begin routers begin routers
smarthost_route: smarthost_route:

View File

@ -54,4 +54,3 @@ docker network connect mailer-network name_of_other_container
Now you can use the name of the mailer container, here `mailer` as smarthost name in that other container. Now you can use the name of the mailer container, here `mailer` as smarthost name in that other container.

View File

@ -1,4 +1,9 @@
#!/bin/sh #!/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