I understand the logic behind it -- a document, for example, in the Inbox after a month is "stale." So those organizations make users who want to keep e-mail move if from the inbox/sent folders within a certain timeframe and place it in another "personal" folder, otherwise the document is deleted.
Not that I agree with the logic -- I just understand it.
The easiest way to accomplish your task is to create a scheduled agent, which would cycle through all the documents located in the folders you have specified, and delete any documents that were created before your selected date.
Be aware the "Remove" method of LotusScript will delete the document (or place it in the trash if "soft deletions" are turned on). If you use the "RemoveFromFolder" method, the document will be removed from the folder, but will still be available in the "All Documents" and "Mail Threads" views.
Your agent would look something like this...
Dim db As New NotesDatabase( "yourserver", "mail\themail.nsf" ) Dim view As NotesView Dim doc As NotesDocument Dim docr As NotesDocument 'Temporary placeholder to delete document Set view = db.GetView( "($Inbox)" ) Set doc = view.GetFirstDocument While Not(doc Is Nothing) Set docr = doc Set doc = view.GetNextDocument(doc) If docr.Created < Datenumber( 2005, 7, 4 ) Then Call docr.Remove End If WendSubstitute Call docr.Remove, with Call doc.RemoveFromFolder( "($Inbox)") if your intention is just to "clean up" the inbox/sent folders, rather than deleting those e-mail messages.
This was first published in June 2005