ramdisk config

#!/bin/sh
case “$1” in
start)
/sbin/mdmfs -s 256M md10 /mnt/ramdisk
echo “256MB ramdisk created on /dev/md10 and mounted on /mnt/ramdisk”
exit 0
;;
stop)
/sbin/umount /mnt/ramdisk
/sbin/mdconfig -d -u 10
echo “ramdisk unmounted from /mnt/ramdisk and deleted from /dev/md10”
;;
*)
echo “Usage: `basename $0` {start|stop}” >&2
exit 64
;;
esac

mount /dev/ram0 /var/spool/MailScanner/incoming -t tmpfs -o size=32m
# if use postfix
chown postfix.postfix /var/spool/MailScanner/incoming