procmail
[Top] [All Lists]

Re-filtering....

2001-01-08 14:23:56
Hello to everyone!

I'm still thinking about refiltering of mail - let's take my inbox - it
has now about 2500 messages, most of them could have been sorted long ago
(i.e. procmail reciepes). But, because I'm too lazy, it would happen maybe
within the next month and maybe not. Anyway, I'll have the problem of
re-filtering my existing mail. I believe I'm not the only one ;)). So, how
do the big of this world do this using procmail/formail? My solution is
now:

#!/usr/bin/perl -w
# Refilter Mail

$a=$ENV{HOME}."/refilter_mail_tmp_".time;
system ("mkdir $a");

system ("mv $ENV{HOME}/Mail/Mails/* $a");
chdir ($a);
@files=`find -type f`;
foreach (@files) {
    print $_;
    chomp $_;
    system ("procmail < \"$_\"") == 0 || die;
}
system ("rm $a -r");

But, since I'm using Maildir format (Stuphead doesn't support mbox :()
this process is incredibly slow. Does anyone have  an idea how to speed it
up? Thanks in advance.

PS. I would be grateful for an idea of client-independent purging of
mailboxes, let's say, messages older than 14 days would be deleted....

-- 
Nikolai Prokoschenko (prokosch(_at_)gmx(_dot_)net)
Powered by  Linux 2.4.0-test12
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>