[Mimedefang] Getting Geylisting working
Michael Lang
michi+mimedefang at relay3.jackal-net.at
Thu Sep 28 13:49:46 EDT 2006
On Thu, 2006-09-28 at 13:08 +0100, Andrew Watkins wrote:
> I thought I would look at greylisting, and follow the example on the
> wiki website using the SQLite version:
> http://www.mimedefang.com/kwiki/index.cgi?Greylisting
>
> Since, I have noticed a few bugs in the perl code and after fixing them
> I still get a couple of errors. I wonder has any got a working version
> of GreyListingSQLite then let us know.
>
> Information I am after:
I'm sorry for this foobar on the code there's a missing
$query->execute();
I've tryed the code in a new(clean) Xen Instance right now,
modifing only
# build the tripple
my $tripple = "$RelayAddr/$Sender/" . $Recipients[0];
$query = $GreyList->prepare("SELECT DISTINCT tripple, sessionid FROM \"greylisting\"".
" WHERE \"tripple\" = ? AND \"timestamp\" <= ?;") ||
md_syslog('warning', 'Problem on greylist Query: '. $GreyList->errstr) &&
return ('CONTINUE', 'OK');
while ( $row = $query->fetchrow_hashref ) {
to
# build the tripple
my $tripple = "$RelayAddr/$Sender/" . $Recipients[0];
$query = $GreyList->prepare("SELECT DISTINCT tripple, sessionid FROM \"greylisting\"".
" WHERE \"tripple\" = ? AND \"timestamp\" <= ?;") ||
md_syslog('warning', 'Problem on greylist Query: '. $GreyList->errstr) &&
return ('CONTINUE', 'OK');
$query->execute();
# ^^^^^^^^^^^^^^^^^^^^^^
while ( $row = $query->fetchrow_hashref ) {
and everything works find (using perl-DBD-SQLite2)
i will need another day to check it with SQLite3 as i dont have time left now ...
one or more maybe problem is write permission to the SQLiteDB Directory as the
SQLite Engine tries to create a journal file, what user defang isnt permitted for in
/etc/mail
I've corrected those and the cleanup typos in the wiki :)
Greetz mIke
>
> - Perl script which creates the Database - Version on web works but you
> get an error with SQLlite 3.
>
> DBI::db=HASH(0x8279b94)->disconnect invalidates 1 active statement
> handle (either destroy statement handles or call finish on them before
> disconnecting) at CreateDB.pl line 25.
> closing dbh with active statement handles at CreateDB.pl line 25.
>
> - The filter_recipient code.
> Since getting an error "couldn't insert tripple"
>
> - GreyListCleanup.pl script:
> Couple of typos in the original.
>
> Thanks
>
> Andrew
> _______________________________________________
> NOTE: If there is a disclaimer or other legal boilerplate in the above
> message, it is NULL AND VOID. You may ignore it.
>
> Visit http://www.mimedefang.org and http://www.roaringpenguin.com
> MIMEDefang mailing list MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
--
Michael Lang <michi+mimedefang at relay3.jackal-net.at>
More information about the MIMEDefang
mailing list