postfix: Update to version 3.7.6, move to Quadlet

This commit is contained in:
Alex Palaistras 2023-08-13 16:30:09 +01:00
parent 67e16b82df
commit c285828395
5 changed files with 28 additions and 33 deletions

View File

@ -1,5 +1,5 @@
FROM docker.io/debian:bullseye-slim FROM docker.io/debian:bookworm-slim
ARG VERSION=3.5.13 ARG VERSION=3.7.6
RUN apt-get update -y && apt-get install -y --no-install-recommends \ RUN apt-get update -y && apt-get install -y --no-install-recommends \
postfix=${VERSION}* postfix-mysql=${VERSION}* syslog-ng-core gettext ca-certificates postfix=${VERSION}* postfix-mysql=${VERSION}* syslog-ng-core gettext ca-certificates

View File

@ -2,8 +2,8 @@
# Main configuration file for Postfix. # Main configuration file for Postfix.
# #
# Version 2 is current for Postfix > 3.2 configuration. # Version 6 is current for Postfix > 3.6 configuration.
compatibility_level = 2 compatibility_level = 3.6
# Log to standard output. # Log to standard output.
maillog_file = /dev/stdout maillog_file = /dev/stdout

View File

@ -0,0 +1,22 @@
[Unit]
Description=Postfix SMTP server
Wants=container-build@%N.service dovecot.service
After=container-build@%N.service dovecot.service
[Container]
ContainerName=%N
EnvironmentFile=%E/coreos-home-server/%N/%N.env
Image=localhost/%N:latest
PublishPort=25:25
PublishPort=465:465
PublishPort=587:587
Network=internal
Volume=dovecot:/var/mail:z
Volume=letsencrypt:/etc/ssl/private:z,ro
[Service]
ExecReload=/bin/podman exec %N postfix reload
Restart=on-failure
[Install]
WantedBy=multi-user.target

View File

@ -4,9 +4,5 @@ storage:
trees: trees:
- path: /etc/coreos-home-server/postfix - path: /etc/coreos-home-server/postfix
local: service/postfix/ local: service/postfix/
- path: /etc/systemd/system - path: /etc/containers/systemd
local: service/postfix/systemd/ local: service/postfix/quadlet/
systemd:
units:
- name: postfix.service
enabled: true

View File

@ -1,23 +0,0 @@
[Unit]
Description=Postfix SMTP server
Wants=container-build@%N.service dovecot.service
After=container-build@%N.service dovecot.service
[Service]
Type=notify
NotifyAccess=all
SyslogIdentifier=%N
Restart=on-failure
Environment=PODMAN_SYSTEMD_UNIT=%n
ExecStart=/bin/podman run --replace --name %N --net internal --sdnotify=conmon \
--env-file %E/coreos-home-server/%N/%N.env \
--publish 25:25 --publish 465:465 --publish 587:587 \
--volume dovecot:/var/mail:z \
--volume letsencrypt:/etc/ssl/private:z \
localhost/%N:latest
ExecStop=/bin/podman stop --ignore --time 10 %N
ExecStopPost=/bin/podman rm --ignore --force %N
ExecReload=/bin/podman exec %N %N reload
[Install]
WantedBy=multi-user.target