Re: [Evolution] Evolution 2.24 + clamav



Josà Carlos Martins wrote:
Qui, 2008-12-04 Ãs 08:47 -0500, Reid Thompson escreveu:
On Thu, 2008-12-04 at 13:31 +0000, Josà Carlos Martins wrote:
Hello to all

It is my first time that i use a mail list, so, if i'm not doing things
the right way please advise.
I use Mandriva 2009.0 with Gnome and Evolution. I was a long time user
of Kde so in some things i fill a bit "lost".
I have tried to create a filter to allow my incoming mail's to be scaned
by clamav (clamscan or clamdscan) but with no success.
I searched the archives of the list and there are a few posts about this
but they are very old and, because of that, i think, i had no success
with those tips.
I tried to find a solution in the Mandriva forums but they told me that
it was not possible unless i created a mail server or switched to kmail.
So my question is:
Is it possible to scan incoming mail with an antivirus in Evolution?
If yes how can i do it?

Thank you all for the attention
JosÃ

_______________________________________________
Evolution-list mailing list
Evolution-list gnome org
http://mail.gnome.org/mailman/listinfo/evolution-list
Since I was fooling around with ruby at the time, I setup a filter to
utilize a ruby script with clamav...  You could substitute another
language/api in place of ruby.

You probably would also want to comment out the logging functionality,
as it will eat up lots of space over time unless you cron a job to keep
the logdir under control...



rthompso raker ~/bin $ cat rubyclamav.rb #!/usr/bin/ruby
#
require 'socket'
fp = File.open("/var/log/rubyclamav/rubyoutclam_#{Process.pid}.log",
"a")
START_TIME=Time.now
sendSock = UNIXSocket.open('/var/run/clamav/clamd.sock')
#sendSock = UNIXSocket.open('/var/run/clamav/clamd.ctl')
sendSock.puts("STREAM")
retStr = sendSock.gets
tag, val = retStr.split
sendSock1 =  TCPSocket.open('localhost',"#{val}")
#res = $stdin.read
sendSock1.write($stdin.read)
sendSock1.close
retStr = sendSock.gets
pt = Time.now - START_TIME
#puts "#{retStr}"
#fp.write("#{res}\n")
fp.write("#{retStr}\n")
fp.write("ProcessTime = #{pt}\n")
fp.close
if retStr.match("FOUND") then
        system("zenity --warning --title=\"Evolution: Virus detected\"
--text=\"#{retStr}\" &")
    exit 1
else
    exit 0
end


Well, i can't make it work.
Any advise?


Thank you
JosÃ


1) look in /etc/clamd.conf -> what is LocalSocket set to?
    mine says /var/run/clamav/clamd.sock
    make sure that it points down a valid directory path
1a) does that socket exist?
    what does    ls -lrt /whatever/your/path/is   return?
2) make sure the ruby script has execute permissions
3) do you have the zenity package installed?
3a) do have ruby  installed?
4) use evo to save an email message to the filesystem && cat it to the script and echo the return status....
    cat saved_email | /path/to/rubyclamav.rb
    echo $?
    what did the echo $?  return?
5) did you setup your filter ala the png that was attached to my earlier email?
6) is clamav running
   what does  ps -ef|grep clam    return?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]