MRatWork Forum by Mustafa Ramadhan

Sawo Project - Kloxo-MR Discussions => Kloxo-MR Technical Helps => Topic started by: idove on 2019-06-24, 16:53:37

Title: Virus scan and clamd how to setup
Post by: idove on 2019-06-24, 16:53:37
I would like to run Virus scan for all incoming/outcoing mails, how to do that?
Do I need to manually install clamd, is it enough to enable Virus scan enable in mail server settings?


Thank you for short how to.

Title: Re: Virus scan and clamd how to setup
Post by: MRatWork on 2019-06-25, 02:26:36
Just enable 'virus scan' in 'mail server settings'.
Title: Re: Virus scan and clamd how to setup
Post by: idove on 2019-06-25, 04:39:00
Now my maillog is full with this lines

Code: [Select]
Jun 25 04:32:23 server clamd: setuidgid: fatal: unknown account clam

Title: Re: Virus scan and clamd how to setup
Post by: MRatWork on 2019-06-25, 07:43:35
Try modified '/var/qmail/supervise/clamd/run' content

from
Code: [Select]
exec /usr/bin/setuidgid clam /usr/sbin/clamd 2>&1to
Code: [Select]
exec /usr/bin/setuidgid root /usr/sbin/clamd 2>&1
Title: Re: Virus scan and clamd how to setup
Post by: MRatWork on 2019-06-25, 07:44:19
Try modified '/var/qmail/supervise/clamd/run' content

from
Code: [Select]
exec /usr/bin/setuidgid clam /usr/sbin/clamd 2>&1to
Code: [Select]
exec /usr/bin/setuidgid root /usr/sbin/clamd 2>&1

and then 'sh /script/restart-mail' or reboot your server.
Title: Re: Virus scan and clamd how to setup
Post by: MRatWork on 2019-06-25, 12:03:39
Rename 'down' to 'run' to enable clamav. Try using 'which clamd'.
Title: Re: Virus scan and clamd how to setup
Post by: idove on 2019-06-28, 23:01:25
Try modified '/var/qmail/supervise/clamd/run' content

from
Code: [Select]
exec /usr/bin/setuidgid clam /usr/sbin/clamd 2>&1to
Code: [Select]
exec /usr/bin/setuidgid root /usr/sbin/clamd 2>&1

and then 'sh /script/restart-mail' or reboot your server.

I manage to do that now problem is on
sh /script/restart-mail

Code: [Select]
supervise: fatal: unable to start clamd_remove/run: file does not exist
supervise: fatal: unable to start clamd_remove/run: file does not exist
supervise: fatal: unable to start clamd_remove/run: file does not exist

And in /var/log/maillog

Code: [Select]
Jun 28 23:00:55 server clamd: ERROR: Can't open/parse the config file /etc/clamd.d/scan.conf
Jun 28 23:00:56 server clamd: ERROR: Please edit the example config file /etc/clamd.d/scan.conf
Title: Re: Virus scan and clamd how to setup
Post by: MRatWork on 2019-06-29, 02:42:04
Update your Kloxo-MR and then run 'sh /script/cleanup; sh /script/clamav-installer; sh /script/fixmail-all'.
Title: Re: Virus scan and clamd how to setup
Post by: idove on 2019-07-05, 23:09:26
'sh /script/cleanup;

*** Restart services - END ***
*** Process Time: 00:00:16:42.1002226 (dd:hh:mm:ss:xxxxxx) ***
REMARK:
 - run 'sh /script/fixdnsaddstatsrecord' to make sure dns records including
   'A record' for 'stats'
 - 'http://domain.com/stats' will be redirect to 'http://stats.domain.com'
[root@server ~]# supervise: fatal: unable to start clamd_remove/run: file does not exist
supervise: fatal: unable to start clamd_remove/run: file does not exist
supervise: fatal: unable to start clamd_remove/run: file does not exist
supervise: fatal: unable to start clamd_remove/run: file does not exist
supervise: fatal: unable to start clamd_remove/run: file does not exist
supervise: fatal: unable to start clamd_remove/run: file does not exist
supervise: fatal: unable to start clamd_remove/run: file does not exist
supervise: fatal: unable to start clamd_remove/run: file does not exist
supervise: fatal: unable to start clamd_remove/run: file does not exist

sh /script/clamav-installer

#cli >> Nothing to do
Seems fine.

' sh /script/fixmail-all'.

Done, seems fine.