coreos-home-server/config/service/postfix/systemd/postfix.service
Alex Palaistras aafa8d9f12 Move systemd files to separate folders
This will help make subsequent synchronization with hosts easier, as
systemd files and potential dropins are guarnateed to exist under a
certain hierarchy that can be dropped as-is into host configuration
directories.
2021-03-26 20:47:08 +00:00

19 lines
964 B
Desktop File

[Unit]
Description=Postfix SMTP server
Wants=container-build@%N.service container-network@mail.service container-network@internal.service dovecot.service
After=container-build@%N.service container-network@mail.service container-network@internal.service dovecot.service
[Service]
Restart=always
ExecStartPre=/bin/install --owner 5000 --group 5000 -d /var/lib/container-service/mail
ExecStartPre=/bin/podman create --replace --pull never --net internal,mail --env-file /etc/container-service/%N/%N.env \
--publish 25:25 --publish 465:465 --publish 587:587 \
--volume /var/lib/container-service/mail:/var/mail:z \
--volume /var/lib/container-service/letsencrypt/private:/etc/ssl/private:z \
--name %N localhost/%N:latest
ExecStart=/bin/podman start --attach %N
ExecStop=/bin/podman stop --time 10 %N
[Install]
WantedBy=multi-user.target