> -----Original Message-----
> I have a Postfix/Courier-imap/MySQL/SpamAssassin mail server with all
> email accounts virtual - no unix accounts. I'd like to have our users
> train SpamAssassin by moving any spam that makes it in to a
> 'learn_spam' subfolder in their imap directory, then running a cron
> job that takes mail it finds in the 'learn_spam' (and in a
> 'learn_ham') directory, runs it through sa-learn, then deletes it.
> 
> I don't know enough about imap's bookeeping to know if deleting a file
> from a subdirectory is a fair way to get rid of it, or if it will
> screw up any sort of index, etc that imapd or the imap client keeps.

Because you are using courier-imap, I'm going to assume that you are
using Maildirs and not mbox format. If that's the case, then you should
be able to safely delete the file representing the message. That's one
of the advantages of Maildir.

Bruce