SQL Redux

Chris-Bellsouth ctrudeau at BELLSOUTH.NET
Thu Jul 31 15:27:58 IST 2003

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  :)


More information about the MailScanner mailing list