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. 3
      docker-compose.yml

6
Dockerfile

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

2
conf/postfix-service.sh

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

3
docker-compose.yml

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

Loading…
Cancel
Save