#
#   MailScanner - SMTP E-Mail Virus Scanner
#   Copyright (C) 2002  Julian Field
#
#   $Id: GenericSpamScanner.pm,v 1.1.2.2 2005/07/01 20:20:13 jkf Exp $
#
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
#   The author, Julian Field, can be contacted by email at
#      Jules@JulianField.net
#   or by paper mail at
#      Julian Field
#      Dept of Electronics & Computer Science
#      University of Southampton
#      Southampton
#      SO17 1BJ
#      United Kingdom
#

package MailScanner::CustomConfig;

sub GenericSpamScanner {
  my($ip, $from, $to, $message) = @_;

  print STDERR "Generic Spam Scanner\n";
  print STDERR "====================\n";
  print STDERR "\n";
  print STDERR "IP = \"$ip\"\n";
  print STDERR "From = \"$from\"\n";
  print STDERR "To = \"" . join(", ", @$to) . "\"\n";
  #print STDERR "Message = \"" . join(", ", @$message) . "\"\n";

# To call a remote program you might want to do this:
# my $fh;
# $fh->open("|/usr/local/bin/yourprogramhere|")
#   or die "Could not start yourpgramhere\n";
# $fh->print("$ip\n");
# $fh->print("$from\n");
# foreach my $address (@$to) {
#  $fh->print("$address\n");
# }
# $fh->print(@$message);
#
# $score = <$fh>;
# chomp $score;
# $score = $score+0.0;
#
#  $report = <$fh>;
#  chomp $report;
#
#  return ($score, $report);

  return (0.0, 'No report');
}

1;

