Logging from CustomConfig.pm

Jones, Chris chris.jones at ATMOSENERGY.COM
Tue Oct 5 17:25:32 IST 2004


I am trying to understand logging from within a CustomFunction. I have
set up the function "ByDomainSpamWhitelist" to work in my test
environment.
I do not see any logging from custom functions in either the mail log or
the foreground messages. I have also set my syslog to enable logging
from remote machines. Is there something else I need to enable?


The CustomConfig.pm ByDomainSpamWhiteList:

my $WhitelistDir = '/etc/MailScanner/spam.bydomain/whitelist';
#
# Initialise by-domain spam whitelist and blacklist
#
sub InitByDomainSpamWhitelist {
  MailScanner::Log::InfoLog("Starting up by-domain spam whitelist, " .
                            "reading from %s", $WhitelistDir);
  my $domains = CreateByDomainList($WhitelistDir, \%Whitelist);
  MailScanner::Log::InfoLog("Read whitelist for %d domains", $domains);
}


This is where I have enabled the ByDomainSpamWhiteList in the
MailScanner.conf
# 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. 
Is Definitely Spam = &ByDomainSpamWhitelist
This is where I have set logging to go to the syslog.
# 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
Trying to see log statements from the debug statements
# 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 = yes

This is all I actually see in the /var/log/maillog
Oct  4 12:22:55 u22 MailScanner[23334]: Config: calling custom init
function ByDomainSpamWhitelist 
Oct  4 12:23:04 u22 MailScanner[23335]: MailScanner E-Mail Virus Scanner
version 4.34.6 starting... 
Oct  4 12:23:05 22 MailScanner[23335]:
spamblacklist^I^IByDomainSpamWhitelist
Oct  4 12:23:05 u22 MailScanner[23335]: End of definition file.

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