SQL Redux

Chris-Bellsouth ctrudeau at BELLSOUTH.NET
Thu Jul 31 16:24:43 IST 2003


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

Yeah i tried that and the patch with the CustomConfig.diff barfed on a
couple of chunks.  In analyzing the diff, appears as if version of the diff
included in mailwatch is "before" the version of CustiomConfig.pm enclosed
with 4.22-5:

<SNIP FROM MAILWATCH DIFF>
5c5
< #   $Id: CustomConfig.pm,v 1.3.2.7 2003/05/31 12:08:51 jkf Exp $
---
> #   $Id: CustomConfig.pm,v 1.3.2.5 2003/03/26 22:38:28 jkf Exp $
</SNIP>

and here is the CustomConfig.pm lines from the general distribution:

<SNIP FROM 4.22-5 DIST>

#   $Id: CustomConfig.pm,v 1.3.2.8 2003/06/26 16:54:19 jkf Exp $

</SNIP>

In analyzing the rest of the diff file I noticed that much of the code
changed to include the same code you use in the mailwatch distribution.
hence the sequence of version numbers:  Many of the line numbered
assignments in the diff file were significantly so the patch failed.

In addition, it appears that the diff included in the mailwatch distribution
includes INSERT statements pursuant to my last post:

<SNIP FROM MAILWATCH DIFF FILE>
<     # Insert @fields into a database table
<     my($sth) = $dbh->prepare("INSERT INTO maillog_mail (time, msg_id,
size, from_user, from_domain, subject, clientip, archives, isspam,
ishighspam, sascore, spamreport) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)");
<
$sth->execute($fields[0],$fields[1],$fields[2],$fields[3],$fields[4],$fields
[5],$fields[6],$fields[7],$fields[8],$fields[9],$fields[10],$fields[11]) or
MailScanner::Log::DieLog("Cannot insert row: %s", $DBI::errstr);
<   }
</SNIP>

where it appears that mailwatch patch code is trying to insert into a table
called "maillog_mail" which doesn't exist in the "create.sql" distributed
with the mailwatch (or seperately in my case) code.

I was able to get it working, but I'm not sure that the mailwatch front end
will be able to call appropriate values from the db (since I changed the
query pursuant to the documentation in the 4.22-5 distribution) but I'll
worry about that later.

CT



More information about the MailScanner mailing list