You can do a bind mount so that Exim will continue to write to its standard spool directory. To do so, add the following line to your /etc/fstab
file:
/mnt/ramdisk /var/spool/exim none bind 0 0
Alternatively, you can just point Exim to the ramdisk mountpoint. To do so, you’ll need to set the following in the exim.conf
file:
spool_directory = /mnt/ramdisk
Obviously you would only do either one of the aforementioned, not both.