[Unit] Description=unit status mailer service for %i [Service] Type=oneshot ExecStart=sh -c 'systemctl --user status %i | mail --append="From: systemd" --append="X-systemd: %H %m %b" --subject="[systemd] %i failure" %u' # Hardening DevicePolicy=closed IPAddressDeny=any PrivateMounts=true PrivateTmp=true ProtectControlGroups=true ProtectHome=true ProtectSystem=full RemoveIPC=true SystemCallErrorNumber=EPERM UMask=027