I'm replying to this thread because I encountered a similar, perhaps related, problem two days ago. Email sans attachments were sent and received without issue. Emails with attachments were sent and received inconsistently, possibly related to file type and/or size.
Reviewing /var/log/clamd/, I found:
@400000005f60fe17021a2b7c SelfCheck: Database status OK.
@400000005f61003c0a6f68dc LibClamAV Warning: fmap: map allocation failed
@400000005f61003c0a6f6cc4 LibClamAV Error: CRITICAL: fmap() failed
@400000005f61003c0a6fa374 /var/spool/qpsmtpd/1600192546:43746:0: Can't allocate memory ERROR
In any case, this forum post
https://forums.contribs.org/index.php?topic=54070.0 contained the solution, which for me was:
db configuration setprop clamd MemLimit 1800000000
signal-event clamav-update
Users have reported no issues since. Hope this will help out someone else. Good luck!