Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
267a4954ab | |||
81f57a53ce |
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -16,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:
|
||||
|
@ -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.
|
||||
|
||||
|
||||
|
7
start.sh
7
start.sh
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user