CustomConfig.pm

Brad Beckenhauer brad at BECKENHAUER.COM
Wed Mar 9 03:39:31 GMT 2005


    [ The following text is in the "iso-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Julian,
I'm trying out the IPBlock section of CustomConfig.pm and was curious why all the logging lines are commented out (Lines 756 & 904-910)?   

What User/Permissions does the IPBlock section of CustomConfig.pm run as/need to enable logging?

I've un-commented the above lines and created the files and restart MS, but I've not been able to determine the appropiate owner/permissions combinations.  The Lock file seems happy as shown below, but not the .log file.

Since MS is running as user postfix and group postfix, I tired using those users/permissions first, but the log files keep saying that nothing can be written to the .log file.

Mar  8 21:01:29 mail MailScanner[27106]: Initialising IP blocking
Mar  8 21:01:29 mail MailScanner[27106]: Read 29 IP blocking whitelist entries from /etc/MailScanner/IPBlock.conf
Mar  8 21:01:34 mail MailScanner[26721]: IPBlock: Cannot open /var/spool/MailScanner/IPBlock.log for writing

<snip lines 902-910>
  ## Add this IP address to the log file.
  ## It is faster to always write it than to check if it needs to be written.
  my $LogH = new FileHandle;
  unless ($LogH->open(">+$LogFile")) {
    MailScanner::Log::WarnLog("IPBlock: Cannot open %s for writing", $LogFile);
    return 1;
  }
  print $LogH $ip . "\n";
  $LogH->close;
</snip>

Current settings:
 ls -la /var/spool/MailScanner
-rw-r--r--  1 postfix postfix 12288 2005-03-08 21:20 IPBlock.db
-rw-r--r--  1 postfix postfix     0 2005-03-08 21:20 IPBlock.lock
-rw-r--r--  1 postfix postfix     0 2005-03-08 20:54 IPBlock.log

Suggestions?
thanks
Brad

------------------------ 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).

Support MailScanner development - buy the book off the website!




More information about the MailScanner mailing list