10

Using

BitDefender integration

BitDefender

 

#Save the standard-input to a temporay file cat > $TMPFILE

#Scan it with BitDefender, filter the output and echo the header if $BDSCAN $TMPFILE grep -q infected; then

echo "X-Virus-Flag: yes" else

echo "X-Virus-Flag: no"

fi

#Output the email and remove the temporary file

cat $TMPFILE rm $TMPFILE

# End of the script

Even more, you can customize by yourself this filter. You can add a convenient button on the toolbar, to call the filter on the highlighted message.

Filter actions in KMail

Due to the current KMail structure, the script is called in the Actions section on the filter. That means the only action the filter can do is to add a header stating the message is infected or not. It is up to you to add another filter to check for this header and to perform any desired action.

10.2. Server integration

BitDefender Antivirus Scanner for Unices can also be used to scan the email traffic passing through an email server. There are additional tools to integrate the server and the antivirus. These are just few examples of how to make a low-budget email scanner using BitDefender Antivirus Scanner for Unices.

68

Page 68
Image 68
Unisar 1.24.1867 manual Server integration, Filter actions in KMail