Hi
OK but I cannot support you on it - it works for us it may not for you or
anybody else. You need to create a DB table for it to store data in - the
SQL is at the bottom of the attached file.
Run this at your own risk. Anything may happen and probably will.
Regards
Diarmaid
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Suhas (QualiSpace)
Sent: 05 October 2006 15:58
To: [email protected]
Subject: RE: [IMail Forum] Logs of StarEngine
Hello,
If you don't mind, can you provide me your perl script so I can test it on
my server?
Warm Regards,
Suhas
System Admin
QualiSpace - A QuantumPages Enterprise
===========================
URL: http://www.qualispace.com
===========================
QualiSpace Community Discussion forum: http://forum.qualispace.com
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Diarmaid Mac
Aonghusa
Sent: Thursday, October 05, 2006 8:11 PM
To: [email protected]
Subject: RE: [IMail Forum] Logs of StarEngine
No, just tells you if it passed, it was whitelisted or if it was marked as
spam. Take a look at it and you will see all it has to offer! We use a
PERL script to analyse it each day to create a record of what it is doing.
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Suhas (QualiSpace)
Sent: 05 October 2006 15:31
To: [email protected]
Subject: RE: [IMail Forum] Log's of StarEngine
Does it mention the reason?
Warm Regards,
Suhas
System Administrator
QualiSpace - A QuantumPages Enterprise
===========================
URL: http://www.qualispace.com <http://www.qualispace.com/>
===========================
QualiSpace Community Discussion forum: http://forum.qualispace.com
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Diarmaid Mac
Aonghusa
Sent: Thursday, October 05, 2006 7:16 PM
To: [email protected]
Subject: RE: [IMail Forum] Log's of StarEngine
In the spool directory there is a file called spamMMDD.log.
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Suhas (QualiSpace)
Sent: 05 October 2006 14:31
To: [email protected]
Subject: [IMail Forum] Log's of StarEngine
Hello,
Does StarEngineService generate any log for emails marked as spam?
Warm Regards,
Suhas
System Administrator
QualiSpace - A QuantumPages Enterprise
===========================
URL: http://www.qualispace.com <http://www.qualispace.com/>
===========================
QualiSpace Community Discussion forum: http://forum.qualispace.com
To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/
use Win32::ODBC;
use POSIX;
# Coded for Fusio Ltd by Nick Delany
$connection = "DSN=[];UID=[];PWD=[];"; # change as appropriate
$spamdir = "z:\\"; # change as appropriate
$log_date = strftime("%m%d", localtime(time-86400));
$filename = $spamdir . "spam" . $log_date . ".log";
open LOGFILE, $filename;
$total = 0;
$whitelist = 0;
$spam = 0;
while (<LOGFILE>)
{
$total++;
if ($_ =~ /white list/)
{
$whitelist++;
}
elsif ($_ =~ /determined to be spam/)
{
$spam++;
}
}
$sql = "insert into DailySpamData (log_date, total, whitelist, spam) values
('$log_date', $total, $whitelist, $spam)";
print $sql;
if (!($Data = new Win32::ODBC($connection)))
{
print "Connection failed:" . Win32::ODBC::Error();
exit;
}
if ($Data->Sql($sql))
{
print "Insert failed " . $Data->Error();
}
$Data->Close();
# Below is not part of the PERL script - it is a SQL command - remove before
trying to run the script !!!
# You need to create a DB table like the following for the data to be inserted
into
#
CREATE TABLE [dbo].[DailySpamData] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[log_date] [nchar] (4) COLLATE Latin1_General_CI_AS NULL ,
[total] [int] NULL ,
[whitelist] [int] NULL ,
[spam] [int] NULL ,
[NotSpam] [int] NOT NULL ,
[SpamPerCent] [numeric](19, 4) NOT NULL ,
[DateAdded] [datetime] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DailySpamData] WITH NOCHECK ADD
CONSTRAINT [DF_DailySpamData_NotSpam] DEFAULT (0) FOR [NotSpam],
CONSTRAINT [DF_DailySpamData_NotSpamPerCent] DEFAULT (0) FOR
[SpamPerCent],
CONSTRAINT [DF_DailySpamData_DateAdded] DEFAULT (getdate()) FOR
[DateAdded]
GO