Deleting IMAP mail from shell script
wcooley at nakedape.cc
Thu May 12 19:30:18 EDT 2005
On Thu, 2005-05-12 at 16:35 -0600, 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?
Fiddling directly with the Cyrus mail spool is a bad thing. Here's a
script I wrote to do what you want, except for the 'notspam' part:
You'll also need the simaplib.py from the parent directory.
Wil Cooley wcooley at nakedape.cc
Naked Ape Consulting http://nakedape.cc
* * * * Linux, UNIX, Networking and Security Solutions * * * *
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.andrew.cmu.edu/mailman/private/info-cyrus/attachments/20050512/2d834f71/attachment.bin
More information about the Info-cyrus