From: dagbrown@... (Dave Brown) Date: 2003-09-21T07:04:47+09:00 Subject: Re: Viruses In article <3F6B658C.8050405@earthlink.net>, Michael Garriss wrote: : [virtual rotten apple flies though the air] I was justing think that! : So let's see the ruby version someone.....this could be a learning : experience for me as I have no POP3 knowledge at all. Oh, not hard. #------------------------------------------------------------------------ require 'net/pop' require 'gurgitate-mail' # grab it from rubyforge, but it's not very good :-) server='put_your_server_here' username='put_your_username_here' password='put_your_password_here' # Danger danger danger! Net::POP3.start(server,'pop3',username,password) do |p| p.mails.each do |m| # No need to grab the entire message, so just get the # first 500 lines. Should speed things up a bit for the # dialup folks. g=Gurgitate::Gurgitate.new(m.top(500).gsub(/\r/,'')) if g.body =~ /TVqQAAMAAAAEAAAA\/\/8AALgAAAAAAAAAQAAAAAAAAA/ then print "Virus from #{g.from} deleted\n" m.delete() else print "Email from #{g.from} is virus-free!\n" end end end #------------------------------------------------------------------------ --Dave