Reporting on Email Ages

Does anyone know of a way to report on number of emails that are 90 days or less as well as the size of those emails?

We are trying either find out of the box reporting solution or simple tool to assist with this.

You can do this using "Journaling" function. But this will not work retrospectively.

You can also setup mail monitoring using the "Message tracking" and reporting, but again: This will not work retrospectively.

If you need to analyze the status quo then there is no builtin tool to do this. But it would be easy to write an agent to collect that information. That would look something like:

	'Loop through the databases on source server:
	Set dbDirSource = New NotesDbDirectory (Server)
	Set dbSource = dbDirSource. GetFirstDatabase (DATABASE)
	strQuery = {Form = "Memo":"Reply" & @Created >= @Adjust( @Today; 0; 0; -90; 0 ; 0 ; 0 )}
	While Not (dbSource Is Nothing)
		'First check if the database is in a specified directory 
		If lcase( left( dbSource.FilePath , 5 ) ) = "mail\" then
			Call dbSource.Open (dbSource.Server, dbSource.FilePath)
			If not dbSource.IsOpen then
				Call ReportWrite( "Could not open database " & dbSource.FilePath )
			Else
			    Set dcMails = dbSource.Search( strQuery, Nothing, 0 )
				Set docMail = dcMails.GetFirstDocument()
				lngCount = dcMails.Count
				lngSize = 0
				While not docMail is Nothing
					lngSize = lngSize + docMail.Size
					Set docMail = dcMails.GetNextDocument(docMail)
				Wend
				Call ReportWrite( "Database " & dbSource.Title & ", " & dbSource.FilePath & ", Docs newer 90 days: " & Cstr( lngCount ) & ", Size: " & Cstr( lngSize ) )
			End If
		End If
		Set dbSource = dbDirSource. GetNextDatabase
	Wend

This code is untested, and Variable declarations, Error Handling, etc. are missing. But most parts of it come from a solution that I use here for analyzing mail databases. The Function "ReportWrite" is also missing, you need to decide what to do there: Write an email, write a log document in an agentlog- database, log to a textfile, whatever...

This code needs to be run with proper rights to access all mail databases.

It is just meant as a starting point, not a complete solution.