CustomConfig.pm

Jones, Chris chris.jones at ATMOSENERGY.COM
Mon Oct 4 14:01:09 IST 2004


I have added a function to the CustomConfig.pm but I cannot get logging
to work
Is there any reason I should not see this in the log?

Here is some entrys from the MailScanner.conf
# This is the syslog "facility" name that MailScanner uses. If you don't
# know what a syslog facility name is, then either don't change this
value
# or else go and read "man syslog.conf". The default value of "mail"
will
# cause the MailScanner logs to go into the same place as all your other
# mail logs
Syslog Facility = mail

# Spam Blacklist:
# Make this point to a ruleset, and anything in that ruleset whose value
# is "yes" will *always* be marked as spam.
# This can also be the filename of a ruleset.
# cjones changed this to support MySqlBL
#Is Definitely Spam = no
Is Definitely Spam = &MySqlBL

# Set Run In Foreground to "yes" if you want MailScanner to operate
# normally in foreground (and not as a background daemon).
# Use this if you are controlling the execution of MailScanner
# with a tool like DJB's 'supervise' (see
http://cr.yp.to/daemontools.html).
#Run In Foreground = no
#cjones changed this to debug
Run In Foreground = yes


This is from CustomConfig.pm
sub InitMySqlBL {
  my( $MySqldb );
  $MySqldb = "************* MysqlBL *****************";
  MailScanner::Log::InfoLog("Starting up MySql spam Blacklist, " .
                            "Reading from mysql %s", $MySqldb );

}
#
sub MySqlBL {
  $MySqldb = "************* MysqlBL *****************";
  MailScanner::Log::InfoLog("MySqlBlacklist: " .
                            "Is returning a 1 as a test value %s",
$MySqldb );
  return 1;

}

sub EndMySqlBL {
  my( $MySqldb );
  $MySqldb = "************* END MysqlBL *****************";
  MailScanner::Log::DebugLog("Ending  MySql spam Blacklist, " .
                            "Reading from mysql %s", $MySqldb );
}


This is all I see in the maillog:
Oct  4 07:55:41 dfw1wu22 MailScanner[21468]: Config: calling custom init
function MySqlBL

I have tried changing:
  MailScanner::Log::InfoLog("Starting up MySql spam Blacklist, " .
                            "Reading from mysql %s", $MySqldb );
To read:

  MailScanner::Log::DebugLog("Ending  MySql spam Blacklist, " .
                            "Reading from mysql %s", $MySqldb );

I don't even get it in the foreground output when I run MailScanner.

Thanks,
Chris Jones
System Engineer
Atmos Energy Corporation

"A leader must never care more about being liked than being right."
George W. Bush

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).



More information about the MailScanner mailing list