44 lines
1.2 KiB
Desktop File
44 lines
1.2 KiB
Desktop File
[Unit]
|
|
Description=Morphit postfix monitor — mail queue depth + age (alerting-self-check)
|
|
Documentation=https://git.agorise.net/agorise/morphit
|
|
After=network-online.target postfix.service
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
# postqueue needs to talk to the postfix daemon's UNIX socket
|
|
# (group postdrop / setgid binary). Running as root is the
|
|
# safe portable default.
|
|
User=root
|
|
Group=root
|
|
|
|
EnvironmentFile=-/etc/morphit/postfix-monitor.env
|
|
ExecStart=/opt/morphit/ops/scripts/morphit-postfix-monitor.sh
|
|
|
|
# ─── Hardening ─────────────────────────────────────────────────
|
|
ProtectSystem=strict
|
|
ProtectHome=true
|
|
PrivateTmp=true
|
|
NoNewPrivileges=true
|
|
ProtectKernelTunables=true
|
|
ProtectKernelModules=true
|
|
ProtectKernelLogs=true
|
|
ProtectControlGroups=true
|
|
ProtectClock=true
|
|
RestrictRealtime=true
|
|
RestrictSUIDSGID=true
|
|
LockPersonality=true
|
|
MemoryDenyWriteExecute=true
|
|
LimitCORE=0
|
|
|
|
# postqueue uses UNIX sockets only; no IP networking needed.
|
|
PrivateNetwork=true
|
|
RestrictAddressFamilies=AF_UNIX
|
|
|
|
CapabilityBoundingSet=
|
|
AmbientCapabilities=
|
|
|
|
SystemCallFilter=@system-service
|
|
SystemCallFilter=~@privileged @resources
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|