On 2016-06-23 18:36, Per Jessen wrote:
Carlos E. R. wrote:
In my case, it is used a few times a day, or perhaps none. I could do a script to run fetchmail and previously load it.
Well, maybe for that situation it is an abuse of resources, but why bother with a daemon at all when your usage pattern is on-demand and infrequent? Just scan your mails straight from procmail, in particular if you're worried about resource usage.
If I scan from procmail, either I use clamd, in which case the situation is the same regarding memory usage, or I use clamav, which means loading it a hundred times, once per email. It takes a minute to scan a file, clamav is very slow to start up.
You seem to want to have your cake and eat it :-) You want fast scanning, but you don't want clamd to keep the database in memory to enable that. Starting and stopping before and after each batch is perhaps a solution. Not sure you can make that work with xinetd, it usually starts a new instance per request.
:-) Well, yes, I would want the scanner to load with the first post, and free the memory or die 5 minutes after idling. I can do it manually, with a script that starts it, then calls fetchmail. Except that amavis also scans emails on send, so no, I can't do it. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)