Print Page | Close Window

statistics

Printed From: LogSat Software
Category: Spam Filter ISP
Forum Name: Spam Filter ISP Support
Forum Description: General support for Spam Filter ISP
URL: https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=1862
Printed Date: 13 March 2025 at 11:56pm


Topic: statistics
Posted By: Guests
Subject: statistics
Date Posted: 02 September 2003 at 5:55pm
is it possible, or will it eventually be possible, to be able to link html (or other code) to the statistics of emails forwarded, blocked, and attempts? The amount of mail that we receive and block is impressive to look at and would be neat to display on a website - in real time. 



Replies:
Posted By: Desperado
Date Posted: 03 September 2003 at 6:14pm

I have retrieved all this using ASP code:

http://spamman.mags.net/admin/AdminMenu.asp" CLASS="ASPForums" TITLE="WARNING: URL created by poster. - Click to return to Main Menu

Current Database Contents


Current Msg. total: 377842 Marked for deletion: 1233
No Reverse DNS: 58316 IP in MAPS B/L: 77418
Email From B/L: 5029 Exc'd max RCPT TO: 3924
Banned Keywords: 231816 Email TO B/L: 0
Domain B/L: 60 IP B/L: 28
Bayesian Filter: 0 Blocked By mx01: 308616
Blocked by Raptor: 69218

Primary SMTP Statistics   (Last Cleared May 25 2003)


Total Inbound Conn.: 3129818 EMail Attempts: 3122043
EMails Forwarded: 968090 EMails Blocked: 3065792

Secondary SMTP Statistics   (Last Cleared May 25 2003)


Total Inbound Conn.: 439556 EMail Attempts: 434204
EMails Forwarded: 48399 EMails Blocked: 625164

 

Dan S.



Posted By: Guests
Date Posted: 04 September 2003 at 9:26am

Hey Dan,

would you mind sharing some of that ASP wisdom with us non ASP people?

Thanks,

Peter



Posted By: Desperado
Date Posted: 05 September 2003 at 3:00am

I am working on trying to collect a more "Generic" version than I use.  Also, getting the running stats from the INI file required that I wrote a function to read a standard format ini file.  That was fairly easy and is as below:

<%
'============================================================
'Functions to parse out a section of the spamfilter.ini file
'============================================================

Function ReadFromIniFile(strFileName,strSection, strKey)

 Dim blnSectionFound: blnSectionFound = False

 Dim blnKeyFound: blnKeyFound = False

 Dim objFSO: Set objFSO = CreateObject ("Scripting.FileSystemObject")

 Dim objTextStream: Set objTextStream = objFSO.OpenTextFile(strFileName)

 Dim strLine
 Dim astrTemp

 Do While Not objTextStream.AtEndOfStream And Not blnSectionFound
   strLine = objTextStream.ReadLine
   If InStr (strLine,"[" & strSection & "]") > 0 Then
     blnSectionFound = True
   End If
 Loop

 Do While Not objTextStream.AtEndOfStream And Not blnKeyFound And blnSectionFound
   strLine = objTextStream.ReadLine
   If Not strLine = vbNullString Then
     If Not InStr (strLine,"[") > 0 And Not InStrRev (strLine,"]") > 0 Then
       astrTemp = Split(strLine,"=")
       If IsArray(astrTemp) Then
         If trim(astrTemp(LBound(astrTemp))) = strKey Then
           blnKeyFound = True
         End If
       End If
     Else
       blnSectionFound = True
      End If
   End If
 Loop

 If blnKeyFound Then
   strValue = astrTemp(UBound(astrTemp))
 End If

 ReadFromIniFile = strValue
End Function

'============================================================

%>

The section of code in my web interface that actually uses the function is as follows:

      <tr>
        <td align="right"><font face="Arial" color="#008000"><small><strong>EMails Forwarded:</strong></small></font></td>
        <td width="5"></td>
        <td align="right"><small><font face="Arial" color="#FF0000"><strong><%Response.Write ReadFromIniFile("d:\SpamFilterISP\SpamFilter.ini","stats","EMailsForwarded:")%></strong></font></small></td>
        <td width="30"></td>
        <td align="right"><font face="Arial" color="#008000"><small><strong>EMails Blocked:</strong></small></font></td>
        <td width="5"></td>
        <td align="right"><small><font face="Arial" color="#FF0000"><strong><%Response.Write ReadFromIniFile("d:\SpamFilterISP\SpamFilter.ini","stats","EMailsBlocked")%></strong></font></small></td>
      </tr>

I hope this helps in the short term.

Dan S.



Posted By: Guests
Date Posted: 05 September 2003 at 11:23am
Thanks, I'll give that a try.



Print Page | Close Window