Deleting IMAP mail from shell script
Andrzej Adam Filip
anfi at xl.wp.pl
Thu May 12 19:10:42 EDT 2005
Sun Advocate Webmaster wrote:
> I have a simple question concerning mail deletion in Cyrus mailboxes. I
> have spamassassin set up, with two mailboxes "spam at domain.com" and
> "notspam at domain.com". A shell script runs periodicly and parses these
> messages (sa-learn compiles training data from the messages). After that
> parsing is done, it needs to empty the mailboxes.
> I was going to add a "rm" command, but I'm thinking that will cause data
> corruption with cyrus.
> Is there a better way to do this?
SpamAssassin is wrriten in perl (module named Mail::SpamAssassin).
Have you considered writing you script in perl and using some CPAN.org
module for accessing *IMAP* mailboxes? [e.g. Net::IMAP::Simple]
Andrzej [en:Andrew] Adam Filip anfi at priv.onet.pl anfi at xl.wp.pl
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
More information about the Info-cyrus