Perform Virus Scan Using ClamAV

Posted by Van Glass on Jun 29, 2018 4:57:20 PM

This custom trigger action performs a virus scan against a file using ClamAV anti-virus software, specifically the clamscan command.  Arguments supplied to the clamscan command may be used to quarantine or delete files upon detection of infected files.



Source code and build instructions


How to scan and remove an infected file using ClamAV

 Let me now show you how to implement that.


1. Make sure you have already ClamAV installed in the server

Before creating a custom trigger action, you need to have ClamAV anti-virus software installed in the server where JSCAPE MFT Server is running.


2. Create a Trigger for ClamAV Scan and Remove Infected Files

Login into admin console of JSCAPE MFT Server > Triggers and Click Add to create a Trigger

Give the trigger a Name and then select the File Upload event type from the drop-down list. 



Click Next to Step 2 where a condition can be set to execute the trigger.

If no conditions required Click Next  to proceed. 


The step 3 asks to add an action, Add the action "Clam Av virus Scan" from drop down list. If the action not found read the build instructions (Source code and build instructions) .

Click OK to proceed



The Parameters for the action "Clam Av virus Scan" are ;

  • Location 
  • Arguments
  • Output Log


As the name indicates, Location is the path where "clamscan" process is located. Arguments represent the parameters needed for "clamscan" command line to work. Multiple arguments can be passed using comma separator. For removing infected files during upload use the parameter as ;




Output log is the file where all scan information will be written.

Click OK to save the settings



 That's it. Now you know how to create a trigger to remove infected files on File upload Using ClamAV


Topics: JSCAPE MFT Server, Triggers, Actions