Running SME 9, completely updated...
Clamd has been running for me for ages, with no problems. But yesterday, it suddenly experienced a memory problem:
2015-06-02 13:03:44.069130500 malloc_problem: Cannot allocate memory
2015-06-02 13:03:44.069134500 LibClamAV Error: cli_malloc(): Can't allocate memory (78 bytes).
2015-06-02 13:03:44.069135500 LibClamAV Error: lineCreate: Unable to allocate memory for ret
2015-06-02 13:04:11.512157500 Access denied: (null)
Messages similar to these are shown several times in the clamd log for the following hours.
I first noticed this a few hours later, because the server wouldn't accept incoming e-mails. top showed a cpu-utilization of 100% for clamd. The qpsmtpd log-file showed lots of messages like
2015-06-02 15:05:57.532424500
2015-06-02 15:05:57.532424500 9995 logging::logterse plugin (deny): ` 212.60.118.215 msg1.anycloud.dk msg1.anycloud.dk <faktura@fb.dk> <user@mydomain.dk> virus::clamav 902 msg denied before queued
2015-06-02 15:07:05.384682500 10019 virus::clamav plugin (data_post): Changing permissions on file to permit scanner access
2015-06-02 15:07:05.405196500 10019 virus::clamav plugin (data_post): ClamAV error: /usr/bin/clamdscan --stdout --config-file=/etc/clamd.conf --no-summary /var/spool/qpsmtpd/1433250418:10019:0 2>&1: 2
I managed to kill -9 clamd, did a signal-event email-update, and the server started accepting emails for internal users again. But for some reason, unknown to me, it still wouldn't accept emails from users outside the LAN, supplying user names and passwords. I wasn't able to find out why.
But even though I didn't change anything, after a few hours, the server started accepting these emails again, as it usually does (users from outside the LAN, using the server as an external SMTP-server, if validated with user names and passwords). Strange ...
I can see on the net that the memory requirements for clamd often have been a problem. But it would be nice, if these situations could be handled more gracefully.