alpine approach completed
All checks were successful
ci/woodpecker/tag/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Wolfgang Hottgenroth 2024-12-11 11:32:47 +01:00
parent 9f65b7690e
commit f205858c30
4 changed files with 19 additions and 22 deletions

View File

@ -12,10 +12,14 @@ ENV RELAYNETS=""
RUN apk add --no-cache exim bash
COPY exim.conf.tmpl /etc/exim
COPY start.sh /etc/exim
WORKDIR /etc/exim
EXPOSE 25
CMD [ "./start.sh" ]

View File

@ -1,15 +0,0 @@
#!/bin/bash
cat update-exim4.conf.tmpl \
| sed -e 's/%HOSTNAME%/'$HOSTNAME'/' \
-e 's#%RELAYNETS%#'$RELAYNETS'#' \
-e 's/%LOCALMAILNAME%/'$LOCALMAILNAME'/' \
-e 's/%SMARTHOST%/'$SMARTHOST'/' \
> update-exim4.conf.conf
cat aliases.tmpl \
| sed -e 's/%ROOT%/'"$ROOT"'/' \
> ../aliases && \
newaliases
/usr/sbin/update-exim4.conf -v

View File

@ -1,5 +1,5 @@
primary_hostname = mail.hottis.de
qualify_domain = hottis.de
primary_hostname = %HOSTNAME%
qualify_domain = %LOCALMAILNAME%
acl_smtp_rcpt = acl_check_rcpt
@ -8,7 +8,7 @@ smarthost_route:
driver = manualroute
domains = *
transport = smarthost_smtp
route_list = * mail.bighost.com
route_list = * %SMARTHOST%
begin transports
smarthost_smtp:
@ -19,10 +19,10 @@ smarthost_smtp:
begin acl
acl_check_rcpt:
accept
hosts = 172.17.0.0/16 : 172.16.3.0/24
hosts = %RELAYNETS%
deny
message = "Relaying denied"
begin rewrite
*@* ${expand:${1}@${qualify_domain}}
*@* ${1}@${qualify_domain} Ffrs

View File

@ -1,5 +1,13 @@
#!/bin/bash
./adjust-config.sh
exim -bd -q15m
rm exim.conf
cat exim.conf.tmpl \
| sed -e 's/%HOSTNAME%/'$HOSTNAME'/' \
-e 's#%RELAYNETS%#'$RELAYNETS'#' \
-e 's/%LOCALMAILNAME%/'$LOCALMAILNAME'/' \
-e 's/%SMARTHOST%/'$SMARTHOST'/' \
> exim.conf
exim -bd -q15m -v