[Unit] Description=Amavisd-new daemon in chroot #Wants=postfix-chroot.service Wants=clamav-daemon-chroot.service After=local-fs.target network.target PartOf=chr-maild.target [Service] #Type=forking RootDirectory=/chroot/maild RootDirectoryStartOnly=no ExecStart=/usr/sbin/amavisd-new Restart=on-failure PIDFile=/chroot/maild/run/amavis/amavisd.pid PrivateTmp=true MountAPIVFS=true NoNewPrivileges=true PrivateDevices=true DevicePolicy=closed ProtectSystem=full ProtectKernelTunables=true ProtectKernelModules=true ProtectKernelLogs=true ProtectProc=invisible ProcSubset=pid ProtectControlGroups=true ProtectClock=true ProtectHome=true #RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK #CapabilityBoundingSet=CAP_NET_BIND_SERVICE CAP_DAC_READ_SEARCH #RestrictNamespaces=uts ipc pid user cgroup #RestrictNamespaces=yes RestrictRealtime=yes RestrictSUIDSGID=yes #MemoryDenyWriteExecute=yes # (amavis needs this) #LockPersonality=yes ReadOnlyPaths=/bin /sbin /lib /lib64 /usr /boot /etc ReadOnlyPaths=/chroot/maild ReadWritePaths=/chroot/maild/run ReadWritePaths=/chroot/maild/var/lib/amavis /chroot/maild/var/log/amavis /chroot/maild/var/cache/razor InaccessiblePaths=/chroot/maild/boot /chroot/maild/sys /chroot/maild/proc # run BindPaths=/chroot/maild/run:/run:norbind # log, systemd notify BindPaths=/run/systemd/notify:/run/systemd/notify:norbind /run/systemd/journal/dev-log:/run/systemd/journal/dev-log:norbind # clamd socket BindPaths=-/chroot/maild/run/clamav:/run/clamav:norbind [Install] #WantedBy=multi-user.target WantedBy=chr-maild.target