manipulate files in /var/spool/imap/

Rob Siemborski rjs3 at andrew.cmu.edu
Thu Nov 13 14:17:09 EST 2003


On Thu, 13 Nov 2003, Rajesh Saxena wrote:

> Hi. I would like to create 'spam' and 'notspam' folders in each of my
> users' accounts. The users will be instructed to move spam email which
> spamassassin has missed into the 'spam' folder and move false positives
> into 'notspam'. Then I want to write a script which will traverse
> through all the users folders in /var/spool/imap/users/*/{spam,notspam}
> and move all the emails into temporary directories where I can run
> sa-learn on the missed messages. My question is can I move the text
> files around like that and delete them when I'm done? Except for the
> cyrus.* files -- or should I delete those too? I'm not sure if I need
> to use cyrus provided tools to delete those emails once i don't need
> them anymore or if I can just use rm.

If you do delete the files directly, you will need to reconstruct the
mailbox afterwords (and will still have a race condition).

It'd be MUCH better to do all the access through IMAP, like you're
supposed to ;)

-Rob

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
Research Systems Programmer * /usr/contributed Gatekeeper





More information about the Info-cyrus mailing list