exclude plugin from cache 0.84

[email protected] (Aleksandar Lazic)
Newsgroups perl.qpsmtpd
Message-ID <[email protected]>
Dear listmembers,

please can you point me to the right doc, I think I have somethin
missed.

My Sysadmin have updated qpsmtpd to 0.84.
Now the plugins are deliverd from cache.

I have modified the following plugins like this

###
#diff -u /usr/share/qpsmtpd/plugins/connection_time.orig
#/usr/share/qpsmtpd/plugins/connection_time
--- /usr/share/qpsmtpd/plugins/connection_time.orig	2011-07-31
#23:44:25.000000000 +0200
+++ /usr/share/qpsmtpd/plugins/connection_time	2011-07-31
#23:43:03.000000000 +0200
@@ -19,6 +19,7 @@
  
  use Time::HiRes qw(gettimeofday tv_interval);
  use Qpsmtpd::Constants;
+use OSSP::uuid;
  
  sub register {
      my ($self, $qp, @args) = @_;
@@ -35,6 +36,9 @@
  sub hook_pre_connection {
      my ($self, @foo) = @_;
      $self->{_connection_start} = [gettimeofday];
+    my $uuid = new OSSP::uuid;
+    $uuid->make('v4');
+    $self->{_connection_id} = $uuid->export("str");
      return (DECLINED);
  }
  
@@ -52,6 +56,7 @@
          $self->log($self->{_level},
                     "Connection time from $remote: $elapsed sec.");
      }
+    undef $self->{_connection_id} if $self->{_connection_id};
      return (DECLINED);
  }
###
#diff -u !$ /usr/share/qpsmtpd/plugins/logging/syslog
diff -u /usr/share/qpsmtpd/plugins/logging/syslog.orig
/usr/share/qpsmtpd/plugins/logging/syslog
--- /usr/share/qpsmtpd/plugins/logging/syslog.orig	2011-07-31
23:45:29.000000000 +0200
+++ /usr/share/qpsmtpd/plugins/logging/syslog	2011-07-31
23:43:03.000000000 +0200
@@ -180,7 +180,7 @@
      my $priority = $self->{_priority} ?
                     $self->{_priority} : $priorities_{$trace};
  
-    syslog $priority, '%s', join(' ', @log);
+    syslog $priority, '%s', join(' ',
$self->{_connection_id}?$self->{_connection_id}:'NOID',@log);
      return DECLINED;
  }
###

The problem now is that the connection_time plugin does not execute the
uuid part and therefore I get the NOID string always in the logs.

How can I change this?

Thanks for your help.

BR
Aleks
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.