Gary wrote:
So, I'm asking, how would you go about reading in lots of emails for processing (spamassassin, bogofilter, razor) and then deleting them?
Originally I thought I could take all the mail and store it into an mbox format, which would be very effective for batch processing, but courier-imap won't have any of that.
Courier only supports Maildir format, as you may have gathered...
Thanks for the response. I think I should have provided more details the first time around. What I had working under uw-imap and mbox files was a process where mail was tested under spamassassin and bogofilter and then filed accordingly. However, these test are not 100% and sometimes you get spam through the filters and ham in the spam folder. In order to teach the bayesian filters easily, for me, I simply moved the incorrect email into folders I designated for corrections: ham2spam and spam2ham. I would then run a cron job to essentially read in the mbox files into sa-learn and bogofilter to re-learn the bayesian statistics. At the end of this, I would delete the email ( '> mail_file' ) and everything was done. But I'm not sure how this could be done using the maildir format. for F in `ls INBOX'; do sa-learn --ham < $F && rm $F done might work, but when I tried this under Cyrus-imap I messed up the folders so bad they didn't really recover. I'm not sure what else might be tried.