Utility to delete old mail messages

Reuben D. Budiardja techlist at voyager.phys.utk.edu
Tue Feb 22 00:54:28 UTC 2005


On Monday 21 February 2005 19:28, Ed Wilts wrote:
> On Mon, Feb 21, 2005 at 06:39:40PM -0500, Reuben D. Budiardja wrote:
> > Anyone knows any utility to delete old mail messages by connecting to
> > IMAP (or POP) server and delete the messages there ?
> > So for example I can specify: "Delete messages older than Jan 1, 2005",
> > or "Delete messages between Aug 1, 2004 and Dec 21, 2005", etc.
>
> I'd be lazy and use mutt or Thunderbird.
>
> This might be ok too:  http://hastymail.sourceforge.net/index.php

Thanks Ed, but I am thinking of something more daemon-like or commad line 
based that I can run from cron periodically. The ones you mentioned are IMAP 
client with features to search messages by dates range, which then you can 
delete. But it's not practical to do that periodically and when you have more 
than twenty IMAP folders. 
So basically I am trying to be more lazy than you :).

> From perl, you can use one of these modules:
> http://www.ruby-doc.org/stdlib/libdoc/net/imap/rdoc/classes/Net/IMAP.html
> http://www.enstimac.fr/Perl/perl5.6.1/site_perl/5.6.1/Mail/IMAPClient.html
> http://search.cpan.org/~robm/Mail-IMAPTalk-1.02/IMAPTalk.pm

Yeah, these are API for perl to connect to IMAP server. Right now I am 
thinking of writing that kind of program myself using PHP (rather than perl) 
for fun since I haven't been able to find any. Shouldn't be too hard I think.
I just wanted to make sure that I'm not re-inventing the wheel.

RDB

-- 
Reuben D. Budiardja
Dept. Physics and Astronomy
University of Tennesse, Knoxville, TN

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT/M/MU/P/S d-(++) s: a-- C++(+++) UL++++ P-- L+++>++++ E- W+++ 
N+ o? K- w--- !O M- V? !PS !PE Y PGP- t+ 5 X R- tv+ 
b++>+++ DI D(+) G e++>++++ h+(*) r++ y->++++
------END GEEK CODE BLOCK------




More information about the redhat-list mailing list