I have just installed clamav for use with amavisd-new. It works fine and the database is updated as it should, but each time frechclam updates the virus database it executes the OnUpdateExecute command not just once, but twice - so I get two mails for each update.
Frechclam.conf contains: > OnUpdateExecute ps axuf | mailx -s "Clamav database update Ok" virusalert and freshclam is executed from cron by the following line: > 48 * * * * exec /bin/su clamav -c "freshclam --quiet" The complete freshclam.conf file can be seen at http://www.dybdal.dk/freshclam.conf . The mail log and the "ps" command output sent by the OnUpdateExecute command show that the command is executed once as a direct subprocess of crond: >USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND >root 3037 0.0 0.0 1768 608 ? S 15:29 0:00 >/usr/sbin/crond -l10 >clamav 7483 0.0 0.0 2916 1240 ? S 23:48 0:00 \_ freshclam >--quiet >clamav 7489 0.0 0.0 2872 1356 ? S 23:48 0:00 \_ sh -c >ps axuf | mailx -s "Clamav database update Ok" virusalert >clamav 7490 0.0 0.0 2196 880 ? R 23:48 0:00 \_ >ps axuf >clamav 7491 0.0 0.0 3256 1016 ? S 23:48 0:00 \_ >mailx -s Clamav database update Ok virusalert and once, immediately afterwards (within the same second), as a subprocess of a "freshclam" subprocess of the first freshclam process: >USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND >root 3037 0.0 0.0 1768 608 ? S 15:29 0:00 >/usr/sbin/crond -l10 >clamav 7483 0.0 0.0 2916 1240 ? R 23:48 0:00 \_ freshclam >--quiet >clamav 7494 0.0 0.0 2916 300 ? R 23:48 0:00 \_ >freshclam --quiet >clamav 7495 0.0 0.0 2872 1344 ? R 23:48 0:00 \_ >sh -c ps axuf | mailx -s "Clamav database update Ok" virusalert >clamav 7496 0.0 0.0 2196 884 ? R 23:48 0:00 >\_ ps axuf Have I done something wrong, or is this a bug? -- Jesper Dybdal, Denmark. http://www.dybdal.dk (in Danish). _______________________________________________ Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net http://www.clamav.net/support/ml