From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Peter Lee Newsgroups: gmane.emacs.help Subject: Re: w3 under development or not? Date: Fri, 14 Nov 2003 15:30:15 GMT Organization: ~ Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <878ymm6d18.fsf@lucien.dreaming> <87brrf2wsu.fsf@yahoo.co.uk> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1068825076 16339 80.91.224.253 (14 Nov 2003 15:51:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 14 Nov 2003 15:51:16 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 14 16:51:13 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AKgE5-0000qd-00 for ; Fri, 14 Nov 2003 16:51:13 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AKh6g-0003uB-1C for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Nov 2003 11:47:38 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr30.news.prodigy.com.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (windows-nt) Cancel-Lock: sha1:n6yh1uuOcAbYqBXAMbzry2FIAdo= Original-Lines: 116 Original-NNTP-Posting-Host: 216.62.199.3 Original-X-Complaints-To: abuse@prodigy.net Original-X-Trace: newssvr30.news.prodigy.com 1068823815 ST000 216.62.199.3 (Fri, 14 Nov 2003 10:30:15 EST) Original-NNTP-Posting-Date: Fri, 14 Nov 2003 10:30:15 EST X-UserInfo1: [[PA@SFGPBSYRIXXKJJD]_HBWB]^PCPDLXUNNHXIJYWZUYICD^RAQBKZQTZTX\_I[^G_KGFNON[ZOE_AZNVO^\XGGNTCIRPIJH[@RQKBXLRZ@CD^HKANYVW@RLGEZEJN@\_WZJBNZYYKVIOR]T]MNMG_Z[YVWSCH_Q[GPC_A@CARQVXDSDA^M]@DRVUM@RBM Original-Xref: shelby.stanford.edu gnu.emacs.help:118239 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:14182 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:14182 >>>> Shane writes: Shane> I know this is slightly off-topic, but I have the same Shane> problem when I download my email under GNUs. It hangs for a Shane> long time while 50 of the latest "Microsoft Internet Shane> Security patches" or other crap are retrieved. During this Shane> wait, I would prefer to be working in a another Emacs Shane> window, but Emacs won't accept any input. I was getting about 50-80 of those a day myself for a while... I wrote a perl script to parse a .spam file containing one regex per line. If any of the regexes in the .spam file match the author or subject in the mail on the server, it's deleted on the server. I mainly just focused on the service packs as they took so long to download. I'm a perl novice, so I'm sure this code could be reduced to about 10 lines by someone that knows the language better. Here's a snippet from my .spam: critical.*update critical.*upgrade customer.*bulletin public.*assistanc internet.*system security.*pack security.*update security.*patch delivery.*system microsoft And the script (I called pop-spam.pl) I just call with no arg for preview: 'perl pop-spam.pl', and 'perl pop-spam.pl delete' when I'm certain of my regexes. #!e:/perl/bin/perl # use strict; use Mail::POP3Client; open SPAM, "<.spam" or die "Failed to open .spam: $!"; my ($parm) = @ARGV; my @spam = ; chomp @spam; my $pop = new Mail::POP3Client(USER => "yourusername", PASSWORD => "yourpasswd", HOST => "your.pop3.server", AUTH_MODE => 'PASS', TIMEOUT => 30, LOCALADDR => undef, DEBUG => 0); for (my $i = 1; $i <= $pop->Count(); $i++) { my @lines = $pop->Head($i); my $subj; my $from; foreach my $ln (@lines) { if ($ln =~ /^From:/i) { $from = $ln; } elsif ($ln =~ /^Subject:/i) { $subj = $ln; } } my ($msg, $size) = split ' ', $pop->List($i); my $deleted = 0; print "($msg) $size bytes\n"; print $from, "\n"; print $subj, "\n"; foreach my $s (@spam) { if ($from =~ /$s/i) { print "-DELETE FROM ($s)\n"; if ($parm =~ /delete/i) { $pop->Delete( $i ); $deleted = 1; } last; } elsif ($subj =~ /$s/i) { print "-DELETE SUBJECT ($s)\n"; if ($parm =~ /delete/i) { $pop->Delete( $i ); $deleted = 1; } last; } } if ($deleted == 0) { print "-OK\n"; } print "\n"; } $pop->Close(); close SPAM;