I wonder if somebody can tell me what causes the following problem and what I can do about it.
Due to high levels of spam I have used the option to delete spam if the score is above a certain level. The amount of spam emails in the mailboxes are dramatically reduced but the amount of disk space used by the users is increasing very quickly - increasing from a few kb to over 50 MB within a few hours. The mail boxes themselves are only small, so I wonder if the junkmail is not deleted immediately - is it held in temp files on the server before deleted and still under ownership of the user?
I would appreciate if somebody could point me into the right direction to stop the disk space used for these users from increasing.
These users are email only users and don’t upload files, and the situation also only comes up after the option to delete spam has been set, so I am convinced that it is related. I have checked what files are owned by one of the users but the output didn’t help (for me), as I don’t know what to expect as normal.
these amounts of disk space used haven’t changed significantly for a few hours now, which looks strange if you consider that they have gone up very quickly initially. Is it possible that these temporary files have not been deleted because the quota was reached during processing - ie that no further modifications of the file system was possible at that point? Looks like I have to eat my words - it is then not the spam deletion causing a problem but the virus scan. If this is the case, is there a recommended size for a mail box - probably not, considering they all receive different amounts of traffic - so any idea how to prevent the problem in the future? Also, should I / can I delete the temp files manually or will the system housekeeping take care of it?
Yes, looks like my last post was right, here is a link to a thread on this forum which discusses the same problem: https://www.virtualmin.com/node/6255 - which then causes my next question:
As there are quite large files created by clamav, does this mean that having this enabled is generally resource hungry in respect of memory and disk space? Would it be a problem to have this enabled for all domains on a server (approx 80)?
Clam can use a decent amount of CPU and/or RAM. That’s just a by-product of virus scanning an email
If you set it to run as a daemon, it uses more RAM but saves on CPU. If you set it to run standalone, it can use a lot more CPU, and only uses RAM in bursts as emails come in.
I tend to recommend the daemon mode when possible
Can Clam work for 80 domains? Sure! I’ve seen it work for hundreds of domains on a server. But it also comes down to how much email you’re receiving.
Also, you could write up a script of some sort to run from cron to delete temp files created by clam that are older than a week or so, if you feel clam is using up too much space in /tmp.