I'm getting hammered by tons of sobig virus on a certain email account. Some dorm in tiawan is sending me 100's of them a day. Heres some perl I brewed up to kill the bloat without downloading it. If you were on dialup and getting hit, this might be helpful. (use at your own risk...) #!/usr/bin/perl # killsobig - Filter out sobig virus emails(and maybe a few other # things too :) using IMAP. use Net::IMAP::Simple; $imap_server = 'mail.server.net'; $imap_username = 'username'; $imap_password = 'password'; # open a connection to the IMAP server $server = new Net::IMAP::Simple( $imap_server ); # login $server->login( $imap_username, $imap_password ); # select the desired folder $number_of_messages = $server->select( 'INBOX' ); print "number of msgs: $number_of_messages\n"; foreach $msg ( 1..$number_of_messages ) { $lines = $server->top($msg); foreach $i (@$lines) { if ($i =~ /^Subject:/i) { ($len) = $server->list($msg); # get email length chomp($i); # kill eol CR LF chop($i); if ( (($len > 95000) && ($len < 110000)) && (($i =~ /.*(My|Your) application/i) || ($i =~ /.*That Movie/i) || ($i =~ /.*Wicked Screensaver/i) || ($i =~ /.*(My|Your) Details/i) || ($i =~ /.*Re: Details/i) || ($i =~ /.*Approved/i) || ($i =~ /.*Thank you!/i))) { print "$msg,len:$len SOBIG VIRUS [$i]\n"; # $server->delete($msg); # kill it! } else { if (($len > 95000) && ($len < 110000)) { print "$msg,len:$len ?SOBIG? [$i]\n"; } else { print "$msg,len:$len OK [$i]\n"; } } } } } # close the connection $server->quit(); _______________________________________________ TCLUG Mailing List - Minneapolis/St. Paul, Minnesota http://www.mn-linux.org tclug-list at mn-linux.org https://mailman.real-time.com/mailman/listinfo/tclug-list