I am looking for utilities to expunge old email from the mail boxes. Currently, we delete a mail message, and it remains in the folder as deleted. How do most people deal with this issue? The messages are never actually removed. At this time, I am looking for a basic "cleaning" script that would remove deleted messages once or twice a day...
Advise is appreciated! Tony At 12:57 PM 04/15/2002 -0700, you wrote: >You could do this with any IMAP library in the language of your choice. >I prefer Perl for quick scripts like this one, but it's by no means the >only way to go. > >So a very simple approach would look like this in the IMAP commands >exchanged between your program and Cyrus: > >* OK mail.cpicorp.com Cyrus IMAP4 v2.1.2 server ready >. login cyrus {cyrus password} >. OK User logged in >. LIST * * >* LIST (\HasChildren) "." "user.wayner" >* LIST (\HasNoChildren) "." "user.wayner.Drafts" >* LIST (\HasNoChildren) "." "user.wayner.Sent" >* LIST (\HasNoChildren) "." "user.wayner.Trash" >* LIST (\HasChildren) "." "user.websurvey" >* LIST (\HasNoChildren) "." "user.websurvey.Trash" >* LIST (\HasChildren) "." "user.wendyc" >* LIST (\HasNoChildren) "." "user.wendyc.Adrian" >* LIST (\HasNoChildren) "." "user.wendyc.Sales Dogs" >* LIST (\HasNoChildren) "." "user.wendyc.Sent" >* LIST (\HasNoChildren) "." "user.wendyc.Trash" >... and so on, Cyrus returns a list of all mailboxes here, have your >script save them to an array of strings and then for each mailbox, you >will need to give the cyrus user permissons to delete messages from the >mailbox, then select the mailbox, and run a search something like this >(check the IMAP syntax, I'm not 100% sure it's right - this should >return the message numbers of all SEEN messages received before this >year): >. SEARCH SEEN NOT SINCE 1-Jan-2002 > >Then you just set the deleted flag on these messages, expunge the >mailbox, reset the mailbox's permissions, and move on to the next >mailbox. > >-Jules ****************************************************************************** * Anthony Brock [EMAIL PROTECTED] * * Director of Network Services George Fox University * ******************************************************************************