Restoring shellx from a backup image required fixing some things that have changed since, like the IP address of NIS servers and the file server.
After that shellx worked, mail functioned properly again.
However, I will need to re-apply updates. I am making a new disk image now in case it was one of the updates that broke things. There are two likely candidates, a bad update, or corruption resulting from improper shutdowns that happened several times in the process of putting a new server in place.
The plan is to make a backup of the server now that it is in a known good state, then bulk apply all the updates and re-test. If everything still works I’ll know it wasn’t an update that caused the problem, if not I’ll restore from the backup now being made and then re-apply updates one at a time to find out which breaks, restore again and re-apply all except the troublesome update.