Clamd Socket Failure = No Virus Scanning on email - fix inside

SYSTEM INFORMATION
OS type and version Centos and Alma
Webmin version 2.402
Virtualmin version 7.30.8
Webserver version Apache 2.4.62
Related packages Clam 1.0.9

I found in the /var/log/procmail.log this line, before each mail listed.
ERROR: Could not connect to clamd on LocalSocket /run/clamd.scan/clamd.sock: Permission denied
Amazing was that noplace in that log did it appear to find a virus. Take a look at your /var/log/procmail.log, might be surprised to see that same line.

Easy fix, add this line to root’s crontab
@reboot chmod 755 /var/run/clamd.scan #Fix permissions on clamd socket

Bonus! After you do that, you get these in that same log instead:
procmail: Program failure (1) of “/etc/webmin/virtual-server/clam-wrapper.pl”
Further research shows they aren’t important, just the result of finding a virus, but still concerned me for a minute.

(Your server is your problem, don’t trust random posts on the internet, but this fixed my issue.)

Another BTW, the first install of Virtualmin sets the permissions correctly, its on a reboot things go badly.