Browse Source

Updated Postfix to version 3.7.2 with Alpine 3.16. Fixed issue with comments and blank lines in overrides

master
Fábio Kaiser Rauber 2 years ago
parent
commit
d23d7d7f2c
  1. 6
      Dockerfile
  2. 2
      conf/postfix-service.sh
  3. 1
      docker-compose.yml

6
Dockerfile

@ -1,4 +1,4 @@
FROM alpine:3.15
FROM alpine:3.16
LABEL MAINTAINER="Fabio Rauber <fabiorauber@gmail.com>"
RUN apk add --no-cache bash postfix postfix-pcre
@ -7,8 +7,6 @@ COPY conf /etc/postfix
VOLUME ["/var/spool/postfix"]
ENTRYPOINT ["etc/postfix/postfix-service.sh"]
CMD [ "start" ]
ENTRYPOINT ["/etc/postfix/postfix-service.sh"]
EXPOSE 25

2
conf/postfix-service.sh

@ -14,7 +14,7 @@ function serviceConf {
# Override Postfix configuration
if [ -f /overrides/postfix.cf ]; then
while read line; do
postconf -e "$line"
[[ -n "$line" && "$line" != [[:blank:]#]* ]] && postconf -e "$line"
done < /overrides/postfix.cf
echo "Loaded '/overrides/postfix.cf'"
else

1
docker-compose.yml

@ -4,5 +4,4 @@ services:
build: .
ports:
- 25
entrypoint: /bin/bash
tty: true
Loading…
Cancel
Save