When using SoftRaid or other external drives for storage you may get permission errors that don't make sense after upgrading to Sonoma OSX 14.3 or later.
The fault is because OSX is protecting these external drives from users with access to read them. Even when running as root. As a curious artifact if you restart surgemail manually using surgemail_start.sh it will suddenly work fine.
To fix this you need to do the following:
# Change ownership of all drives to user 'root' chown -R root:staff /usr/local/surgemail /var/surgemail /Volumes/raiddrive chmod +rx /usr/local/surgemail Apple/System Settings/ Privacy and Security/Full disk access shift command G /usr/local/surgemail find (surgemail and startmail) and add both.
Then restart Surgemail!