Loading ...
Sorry, an error occurred while loading the content.

Re: Postscreen + Logwatch = A bunch of unmatched entries

Expand Messages
  • Stefan Jakobs
    ... 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
    Message 1 of 6 , Apr 1, 2011
    • 0 Attachment
      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/
    • Stefan Jakobs
      ... Sorry, that s not quite correct. A pre-version he posted on the logreporters mailinglist supports postscreen logging (see:
      Message 2 of 6 , Apr 5, 2011
      • 0 Attachment
        On Friday 01 April 2011 14:42:33 Stefan Jakobs wrote:
        > PS: Mike's logreporter script supports postscreen logging, see:
        > http://sourceforge.net/projects/logreporters/

        Sorry, that's not quite correct. A pre-version he posted on the logreporters
        mailinglist supports postscreen logging (see:
        https://sourceforge.net/mailarchive/forum.php?thread_name=4D6289C5.10103%40megan.vbhcs.org&forum_name=logreporters-
        discuss). But the final version should be ready and available on the
        sourceforge site soon.

        Please keep in mind that postfix-logwatch and logwatch (with its postfix
        service script) are different projects.

        Wietse: Do you mind adding postfix-logwatch
        (http://sourceforge.net/projects/logreporters/) to the list of add-on software
        on your website?

        Best regards
        Stefan
      Your message has been successfully submitted and would be delivered to recipients shortly.