AJ,
Second issue first. Are you asking about source domain or destination domain? And what build are you running?
First Issue. If you are using ASP code to manage the quarantine, you can do almost anything with the quarantine. If you want actual traffic statistics to be sorted, you need to parse the log files and what I am doing (not totally finished writing) is re-writing the logs into an SQL DB and using the same ASP code to sort things out.
As an example, the following SQL Statements will return the domain part of a from address that you can later sort on using a normal ordering command like order_By = "Domain, MsgDate, EmailTo, Subject, RejectDetails"
NOTE: The variable "SearchQuery" in this case is looking for a partial match in the from field. I then decide how long a period I want to look at ... 1 hour 24 hours etc
SQL = "SELECT SUBSTRING(EmailFrom, CHARINDEX('@', EmailFrom) + 1, 100) " SQL = SQL & "AS Domain, QuarID, EmailFrom, Subject, MsgDate, MsgID, RejectDesc, RejectDetails, EmailTo " SQL = SQL & "FROM tblQuarantine, tblRejectCodes " SQL = SQL & "WHERE EmailFrom LIKE '%" + Replace(SearchQuery, "'", "''") + "%' " SQL = SQL & "AND (Deliver <> 1) " SQL = SQL & "AND (Expire <> 1) " SQL = SQL & "AND (tblQuarantine.RejectID = tblRejectCodes.RejectID) " If SearchSpan = 1 Then SQL = SQL & "AND (MsgDate >= DATEADD(hour,-1,getdate())) " End If If SearchSpan = 4 Then SQL = SQL & "AND (MsgDate >= DATEADD(hour,-4,getdate())) " End If If SearchSpan = 8 Then SQL = SQL & "AND (MsgDate >= DATEADD(hour,-8,getdate())) " End If If SearchSpan = 24 Then SQL = SQL & "AND (MsgDate >= DATEADD(hour,-24,getdate())) " End If SQL = SQL & "ORDER BY " & order_By Set rs = con.Execute(SQL) RecordCount = rs.RecordCount
This, I believe, will work with access also but my design plan still has to parse the logs into the database and it is a fair amount of work for a non db guy like myself.
Regards, Dan S. (Just a user)
|