Simscan

From QmailToaster
Revision as of 13:30, 26 March 2024 by Ebroch (talk | contribs) (→‎Ramdisk)
Jump to navigation Jump to search

Ramdisk

Use htop or other program to determine available memory for ramdisk (size=)

  1. clamgid=$(test -z "$(cat /etc/passwd | grep ^clamav)" && id -g clamscan 2>/dev/null || id -g clamav 2>/dev/null) && echo $clamgid
  2. qmailctl stop
  3. mount -t tmpfs -o size=1024m,nodev,noexec,noatime,uid=$clamgid,gid=0,mode=0750 myramdisk /var/qmail/simscan
  4. ls -ld /var/qmail/simscan
  drwxr-x--- 2 clamscan root 6 Aug 17 13:28 /var/qmail/simscan
  1. qmailctl start
  2. df -h /var/qmail/simscan
  Filesystem      Size  Used Avail Use% Mounted on
  myramdisk       1.0G     0  1.0G   0% /var/qmail/simscan
  1. cp /etc/fstab /etc/fstab.bak
  2. echo "myramdisk /var/qmail/simscan tmpfs size=1024m,nodev,noexec,noatime,uid=$clamgid,gid=0,mode=0750 0 0" >> /etc/fstab

Make sure /etc/fstab file is okay before a reboot

  1. cat /etc/fstab