fetchmail-friends
[Top] [All Lists]

Re: [fetchmail] Deleting after N days (IMAP)

2003-03-23 13:41:54
Have you looked into modifying popclean to connect to an IMAP server
instead?  That would make changes to fetchmail unnecessary, and could be the
easiest solution to your problem.

The majority of the popclean code should be unaffected.  I would think that
the only code that would require modification would be the code for
connecting to the server,  marking the messages for deletion, and additional
code to expunge the folder.

From what I understand, Jan uses a perl module that is on CPAN to do all of
the pop server work.  There might be a similar module on CPAN to work with
IMAP servers.  If so, it could be a relatively simple solution to your
problem.

With kind regards,

Peter, archdeacon

----
Dormition Skete
A Monastery of the Russian Orthodox Autonomous Church
http://www.BuenaVistaCO.com/GOC
http://www.ROACAmerica.org
----

----- Original Message -----
From: "Thomas Guettler" <guettli(_at_)thomas-guettler(_dot_)de>
To: <fetchmail-friends(_at_)lists(_dot_)ccil(_dot_)org>
Sent: Sunday, March 23, 2003 4:24 AM
Subject: [fetchmail] Deleting after N days (IMAP)

Hi!

Like Jan Klaverstijn I am interested in deleting mails after N days,
except that I need it for IMAP. I have the following solution in mind:

When emails get fetched from the server, fetchmails writes time, UID,
server, username, mailbox in one line into a logfile
(e.g. mailcleaner.log). This needs a modification of the source of
fetchmail. This logging should only be done if it is enabled by the
user.

A second programm reads mailcleaner.log and fetchmailrc and deletes
messages which where fetched more than N days ago.

Before doing any coding I want to know what you think about it. It
think the changes to fetchmail will be very small and would not affect
other fetchmail users.

 thomas

--
Thomas Guettler <guettli(_at_)thomas-guettler(_dot_)de>
http://www.thomas-guettler.de