coreos-home-server/config/service/postfix/postfix.service
Alex Palaistras d9f675817e First public release for CoreOS Home Server
This contains the culmination of work done privately for a few months,
and is intended to be a solid basis for other peoples' experimentations
with setting up single-node, home-server setups using Fedora CoreOS.
2021-03-20 16:32:42 +00:00

20 lines
1.0 KiB
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 \
--env-file /etc/container-service/dovecot/dovecot.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