10

Using

BitDefender integration

BitDefender

 

cat > $TMPFILE

#Scan it with BitDefender and remember the exitcode

$BDSCAN $TMPFILE EXIT=$?

#Remove the temporary file and return the exitcode rm -f $TMPFILE

exit $EXIT

#End of the script

What to do with infected emails

You will not be able to disinfect the message, the only action that can be done is ignore, therefore it's up to you to delete or move the email if BitDefender has found it infected or, better, instruct the email client to do so.

If you want to be able to scan emails from Pine using BitDefender, you have to change your Pine settings to enable Unix pipe commands. Follow these steps.

Start Pine and type S (for Setup), then C (for Config). Use the down-arrow key to find and highlight enable-unix-pipe-cmd(somewhere under Advanced Command Preferences) and enable this preference by typing X. Type E (for Exit Setup) and Y when asked to Save Changes.

Now, in the Index screen and when displaying the email, there is one more command:

Pipe, ready to be tested.

1.When displaying a message or in the Index screen, press the Pipe key (Shift+\).

2.The entire message has to be sent to the filter, so press Control+W (Raw text). The status line should display the message: Pipe RAW message X to :.

3.Type the full path to the filter, not only the script name, for example

/opt/BitDefender-scanner/bin/bdscanpipe, and press ENTER.

This is how the screen should look like.

Pipe RAW message 299 to : /opt/BitDefender-scanner/bin/bdscanpipe

^G Help^W Shown Text ^R With Delimiter ^C Cancel Ret Accept ^Y Free Output

The full email will be piped to BitDefender filter, which will save it temporary on the filesystem and scan this file with bdscan. After the scan, the output results are

64

Page 64
Image 64
Unisar 1.24.1867 manual What to do with infected emails, This is how the screen should look like