2 Commits
0.3.1 ... 0.2.3

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 13 additions and 22 deletions

View File

@ -13,12 +13,6 @@ steps:
dockerfile: Dockerfile
when:
- 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:
image: plugins/kaniko
settings:

View File

@ -1,4 +1,4 @@
FROM alpine:3.21.3
FROM alpine:3.21.0
LABEL Maintainer="Wolfgang Hottgenroth <woho@hottis.de>"
LABEL ImageName="quay.io/wollud1969/exim-docker"
@ -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

@ -8,7 +8,7 @@ kubectl create secret generic smtp-secrets \
--from-literal=SMARTHOST="smtprelaypool.ispgateway.de" \
--from-literal=SMARTHOST_USER="pseudosmarthostuser@hottis.de" \
--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 deploy.yml

View File

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

View File

@ -5,8 +5,6 @@ define(`SMARTHOST', esyscmd(`echo -n $SMARTHOST'))dnl
define(`SMARTHOST_USER', esyscmd(`echo -n $SMARTHOST_USER'))dnl
define(`SMARTHOST_PASS', esyscmd(`echo -n $SMARTHOST_PASS'))dnl
define(`RELAYNETS', esyscmd(`echo -n $RELAYNETS'))dnl
define(`WHITELISTED_RECIPIENTS', esyscmd(`echo -n $WHITELISTED_RECIPIENTS'))dnl
ifelse(SMARTHOST, `', `
errprint(`Error: SMARTHOST not set')
@ -18,15 +16,14 @@ errprint(`Error: HOSTNAME not set')
m4exit(1)
')
dnl ----------------------------------------------------------------
dnl template for exim.conf
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:
@ -61,12 +58,8 @@ begin acl
acl_check_rcpt:
accept
hosts = RELAYNETS
ifelse(WHITELISTED_RECIPIENTS, `', `', `
accept
domains = WHITELISTED_RECIPIENTS
')
deny
message = "550 5.7.1 Relaying denied"
message = "Relaying denied"
ifelse(LOCALMAILNAME, `', `', `
begin rewrite

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.

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