SQL Redux

Steve Freegard steve.freegard at LBSLTD.CO.UK
Thu Jul 31 15:44:42 IST 2003


Hi Chris,

You need to patch CustomConfig.pm using the diffs included with MailWatch as
per the INSTALL doc.

Cheers,
Steve.

-----Original Message-----
From: Chris-Bellsouth
To: MAILSCANNER at JISCMAIL.AC.UK
Sent: 31/07/03 15:27
Subject: Re: SQL Redux

OK...maybe I'm missing something LARGE!....

but it appears like the database schema I built as a result of the
create.sql that I obtained with the mailwatch package from Steve creates
the
following table: (just an example)

CREATE TABLE maillog (
  timestamp timestamp(14) NOT NULL,
  id text,
  size bigint(20) default '0',
  from_address text,
  to_address text,
  subject text,
  clientip text,
  archive text,
  isspam tinyint(1) default '0',
  ishighspam tinyint(1) default '0',
  issaspam tinyint(1) default '0',
  isrblspam tinyint(1) default '0',
  spamwhitelisted tinyint(1) default '0',
  sascore decimal(7,2) default '0.00',
  spamreport text,
  virusinfected tinyint(1) default '0',
  nameinfected tinyint(1) default '0',
  otherinfected tinyint(1) default '0',
  report text,
  hostname text


But the INSERT code in the current 4.22-5 CustomConfig.pm:

my($sth) = $dbh->prepare("INSERT INTO maillog_mail (time, msg_id, size,
from_user, from_domain, subject, clientip, archives, isspam, ishighspam,
sascore, spamreport) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)");

my($sth) = $dbh->prepare("INSERT INTO maillog_report (msg_id, filename,
filereport) VALUES (?,?,?)");
$sth->execute($fields[0],$fields[1],$fields[2]) or
MailScanner::Log::DieLog("Cannot insert row: %s", $DBI::errstr);

not only do the maillog_mail and maillog_report tables not exist, the
schema
that CustomConfig is attempting to insert data into doesn;t appear to be
formatted approrpriately for the inserts..

Not sure I see any references to sql builds anywhere in
documentation/site/FAQ...so I'm stumped...

Now it is likely that I'm missing something obvious...so please guide me
to
the light  :)

CT

--
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the sender and delete the message from your mailbox.

This footnote also confirms that this email message has been swept by
MailScanner (www.mailscanner.info) for the presence of computer viruses.



More information about the MailScanner mailing list