Results 1 to 10 of 12

Thread: Incoming e-mail virus scan with Evolution

Threaded View

  1. #1
    Join Date
    Feb 2005
    Melbourne, Australia
    Ubuntu 12.04 Precise Pangolin

    Incoming e-mail virus scan with Evolution

    Ok, I am posting this here because my previous thread is in the old locked Desktop archive.

    You can have Evolution scan all of your incoming e-mails for viruses and notify you of any detected.

    First you have to install the following packages:

    clamav clamav-freshclam

    This should install the basic Clamav system that updates itself automatically (there are other clam packages you can install for extra functionality).

    Then create a script in a convenient place (like your /home directory), I called mine clam-filter and it contains the following:

    # Fred Blaise <chapeaurouge AT madpenguin DOT org>
    # This program is free software; you can redistribute it and/or modify
    # it under the terms of the GNU General Public License as published by
    # the Free Software Foundation; either version 2 of the License, or
    # (at your option) any later version.
    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # GNU General Public License for more details.
    # You should have received a copy of the GNU General Public License
    # along with this program; if not, write to the Free Software
    # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
    # MA 02111-1307 USA
    # clamscan for non-daemon scanning - clamdscan when the daemon is installed
    clamscan --no-summary --detect-pua=yes --detect-structured=yes - 1>$FILE
    if [ $? -eq 1 ]; then
    STRING=$(grep "FOUND" $FILE |cut -d: -f2)
    zenity --warning --title="Evolution: Malware detected" --text="$STRING" &
    logger -t clamav/Evolution <$FILE
    exit 1
    exit 0
    After you create it, make it executable:

    chmod 777 clam-filter
    Go into Evolution-Edit-Message Filters and create a new Incoming Filter called Virus scan with location of the clam-filter script in the Pipe to Program location and an Evolution folder to dump any e-mails with a virus into (I made one called "Virus Dump) - see attached screenshot.

    Make sure that the filter is at the top of the list and all of you incoming e-mails should be checked by Clamav (so you know when you receive a Windows virus or other malware).

    You can test the functionality by sending yourself an e-mail containing one of the Eicar test files:
    Attached Images Attached Images
    Last edited by dcstar; March 16th, 2010 at 06:16 AM.
    Regards, David.
    Please use the Forum search and Wiki search for immediate help
    Please mark your thread as Solved when appropriate
    New to technical forums?: How To Ask Questions The Smart Way

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts