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

< #   $Id: CustomConfig.pm,v 2003/05/31 12:08:51 jkf Exp $
> #   $Id: CustomConfig.pm,v 2003/03/26 22:38:28 jkf Exp $

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


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


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:

<     # 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 (?,?,?,?,?,?,?,?,?,?,?,?)");
[5],$fields[6],$fields[7],$fields[8],$fields[9],$fields[10],$fields[11]) or
MailScanner::Log::DieLog("Cannot insert row: %s", $DBI::errstr);
<   }

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.


More information about the MailScanner mailing list