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

This commit is contained in:
Wolfgang Hottgenroth 2024-12-11 10:55:34 +01:00
parent 724e94afb6
commit 9f65b7690e
Signed by: wn
GPG Key ID: 18FDFA577A8871AD
4 changed files with 31 additions and 43 deletions

View File

@ -1,4 +1,4 @@
FROM debian:bookworm FROM alpine:3.21.0
LABEL Maintainer="Wolfgang Hottgenroth <woho@hottis.de>" LABEL Maintainer="Wolfgang Hottgenroth <woho@hottis.de>"
LABEL ImageName="" LABEL ImageName=""
@ -7,27 +7,15 @@ LABEL ImageName=""
ENV LOCALMAILNAME="" ENV LOCALMAILNAME=""
# smarthost to send mail to # smarthost to send mail to
ENV SMARTHOST="" ENV SMARTHOST=""
# recipient addresses for root aliases, separate multiple addresses by space
ENV ROOT=""
# 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="" ENV RELAYNETS=""
RUN \ RUN apk add --no-cache exim bash
apt update && \
apt upgrade -y --autoremove && \
apt install -y exim4-daemon-light ca-certificates curl && \
rm -rf /var/lib/apt/lists/*
COPY update-exim4.conf.tmpl /etc/exim4/ WORKDIR /etc/exim
COPY aliases.tmpl /etc/exim4/
COPY adjust-config.sh /etc/exim4/
COPY start.sh /etc/exim4/
WORKDIR /etc/exim4
EXPOSE 25 EXPOSE 25
CMD [ "./start.sh" ]

View File

@ -1,14 +0,0 @@
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
root: %ROOT%

28
exim.conf Normal file
View File

@ -0,0 +1,28 @@
primary_hostname = mail.hottis.de
qualify_domain = hottis.de
acl_smtp_rcpt = acl_check_rcpt
begin routers
smarthost_route:
driver = manualroute
domains = *
transport = smarthost_smtp
route_list = * mail.bighost.com
begin transports
smarthost_smtp:
driver = smtp
port = 25
multi_domain
begin acl
acl_check_rcpt:
accept
hosts = 172.17.0.0/16 : 172.16.3.0/24
deny
message = "Relaying denied"
begin rewrite
*@* ${expand:${1}@${qualify_domain}}

View File

@ -1,14 +0,0 @@
dc_eximconfig_configtype='satellite'
dc_other_hostnames='%HOSTNAME%'
dc_local_interfaces='0.0.0.0'
dc_readhost='%LOCALMAILNAME%'
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets='%RELAYNETS%'
dc_smarthost='%SMARTHOST%'
CFILEMODE='644'
dc_use_split_config='false'
dc_hide_mailname='true'
dc_mailname_in_oh='true'
dc_localdelivery='mail_spool'