Re: [Evolution] Evolution 2.24 + clamav
- From: José Carlos Martins <jccm tec gmail com>
- To: reid thompson ateb com
- Cc: Evolution mail list <evolution-list gnome org>
- Subject: Re: [Evolution] Evolution 2.24 + clamav
- Date: Fri, 05 Dec 2008 12:55:38 +0000
Qui, 2008-12-04 Ãs 22:32 -0500, Reid Thompson escreveu:
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?
Hello
Thank you for your kind help and patience.
My clamd.conf points to /var/lib/clamav/clamd.socket and i changed it in
the ruby program.
Yes the socket exist.
I have ruby 1.8.7 and zenity 2.24.0 installed.
[jose localhost ~]$ cat teste3 | /home/jose/rubyclamav.rb
/home/jose/rubyclamav.rb: line 4: require: command not found
/home/jose/rubyclamav.rb: line 5: syntax error near unexpected token `('
/home/jose/rubyclamav.rb: line 5: `fp =
File.open("/var/log/rubyclamav/rubyoutclam_#{Process.pid}.log",'
[jose localhost ~]$ echo $?
2
[jose localhost ~]$ ls -lrt /var/lib/clamav
total 20196
-rw-r--r-- 1 clamav clamav 18462921 2008-11-14 15:20 main.cvd
srwxrwxrwx 1 clamav clamav 0 2008-12-05 10:42 clamd.socket=
-rw-r--r-- 1 clamav clamav 2178560 2008-12-05 11:42 daily.cld
drwxr-xr-x 2 clamav clamav 4096 2008-12-05 11:42 tmp/
-rw------- 1 clamav clamav 1560 2008-12-05 12:42 mirrors.dat
[jose localhost ~]$ ps -ef|grep clam
clamav 3676 1 0 10:42 ? 00:00:04 clamd -c /etc/clamd.conf
clamav 3725 1 0 10:42 ? 00:00:00 /usr/bin/freshclam
--config-file=/etc/freshclam.conf --user clamav --quiet --daemon
jose 4464 3780 0 12:52 pts/0 00:00:00 grep --color clam
This was the output of the sugested commands but i really don't see what
is wrong.
Thank you
JosÃ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]