[Unit] Description=Collect email reminders [Service] Type=oneshot User=root Group=root ExecStart=/usr/sbin/collect-reminders ExecStartPost=/usr/bin/find /var/spool/email-reminder/ -name '.*' -prune -o -type f -exec /usr/bin/chown email-reminder {} + # Security hardening LockPersonality=true MemoryDenyWriteExecute=true NoNewPrivileges=true ProtectClock=true ProtectControlGroups=true ProtectHostname=true ProtectKernelLogs=true ProtectKernelModules=true ProtectKernelTunables=true ProcSubset=pid RemoveIPC=true RestrictNamespaces=true RestrictRealtime=true # Minimal list of syscalls SystemCallArchitectures=native SystemCallFilter=@system-service # Restrict filesystem access PrivateDevices=true PrivateTmp=true ProtectHome=read-only ProtectProc=invisible ProtectSystem=strict ReadWritePaths=/var/spool/email-reminder RestrictSUIDSGID=true UMask=0077 # No network needed IPAddressDeny=any PrivateNetwork=true RestrictAddressFamilies=none # Minimal capabilities needed for chown AmbientCapabilities= CapabilityBoundingSet=CAP_CHOWN CAP_DAC_OVERRIDE