On Friday 01 April 2011 02:23:08 Wietse Venema wrote:
> I suppose it is a script with a config file with patterns for "known"
> logfile messages. 

The script itself contains the patterns. 
It reads the logfile line by line and checks for the patterns. So basically 
it's something like that:
while (defined($ThisLine = <STDIN>)) {
   if ($ThisLine =~ /pattern/) {
      $variable = ...
   } elsif ...
}

If you could provide some if-clauses with patterns and the corresponding 
setting of variables then I will be able to integrate this into the postfix 
service script. Here's an example of such an if-clause:
   } elsif ( ($Host,$Site) = ($ThisLine =~ /reject: RCPT from ([^ ]*\[[^ 
]*\]): $re_DSN Service unavailable; (?:Sender address |Client host )?\[[^ ]*\] 
blocked using ([^ ]*);/)) {
      $RejectRBL{$Site}{$Host}++;
      $RejectedRBL++;
   }

You can find the whole service script here:
http://logwatch.svn.sourceforge.net/viewvc/logwatch/scripts/services/postfix?revision=12

> If someone can share a copy, then I could try to
> write some rules for normal postscreen, dnsblog and tlsproxy logging.
>       Wietse

Regards
Stefan

PS: Mike's logreporter script supports postscreen logging, see:
http://sourceforge.net/projects/logreporters/

Reply via email to