3 Commits

Author SHA1 Message Date
4f9a333219 new alpine base
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2025-03-27 16:13:30 +01:00
f205858c30 alpine approach completed
All checks were successful
ci/woodpecker/tag/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
2024-12-11 11:32:47 +01:00
9f65b7690e alpine approach
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2024-12-11 10:55:34 +01:00
6 changed files with 43 additions and 58 deletions

View File

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

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,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.tmpl Normal file
View File

@ -0,0 +1,28 @@
primary_hostname = %HOSTNAME%
qualify_domain = %LOCALMAILNAME%
acl_smtp_rcpt = acl_check_rcpt
begin routers
smarthost_route:
driver = manualroute
domains = *
transport = smarthost_smtp
route_list = * %SMARTHOST%
begin transports
smarthost_smtp:
driver = smtp
port = 25
multi_domain
begin acl
acl_check_rcpt:
accept
hosts = %RELAYNETS%
deny
message = "Relaying denied"
begin rewrite
*@* ${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

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'