I seem rather silly asking for help and then going and solving my own problems, but here it is.

You can't refer to the milter plugin twice. I guess it overwrites some global data the second time around. I copied milter to milter2, and then ran a s/milter/milter2/g on the file, changed my plugin configuration and now it works like a charm.

So there you have it.  I hope this is helpful to someone out there.

Cheers,

Eric

Eric Gerlach wrote:
Okay, I've solved some of my own problems. The milter plugin seems to be broken. It's initializing the notes {add, delete, replace} in the connection (line 102), and then trying to use them from the transaction. (e.g. line 72). So I tried changing it to always use the connection (patch included), but now I can use one milter, but not two.

If I use a second milter, I get some really weird behavior. It seems to first execute the second milter with the name of the first milter, and then when it gets to the second one, it hangs when checking the headers. Any idea what's going on here?

Cheers,

Eric

Eric Gerlach wrote:
Hi all,

I've been having some trouble with the milter plugin.  Here's what I'm
getting while using our University's milter services:

552 Can't use an undefined value as a HASH reference at
/usr/share/qpsmtpd/plugins/milter line 72, <GEN6> line 1.

The problem seems to be in the ->{add} part on that line, because if I
evaluate $transaction->notes('milter_header_changes') it's fine, but if
I add ->{add} it fails.

If someone who knows the code and has an inkling of what's going on
could point me in the right direction, I'd really appreciate it as it
would save me a lot of time (it's been about four years since I've
worked with Perl extensively).

I really like the concept of qpsmtpd, and I hope I can get it to work
for my application.

Cheers,

Eric Gerlach
Network Administrator, Federation of Students
University of Waterloo




------------------------------------------------------------------------

*** milter      2006-02-26 07:22:16.000000000 -0500
--- /usr/share/qpsmtpd/plugins/milter   2006-08-17 14:16:51.041912264 -0400
***************
*** 70,79 ****
              }
              else {
!                 push @{$transaction->notes('milter_header_changes')->{add}},
                          [$result->{header}, $result->{value}];
              }
          }
          elsif ($result->{action} eq 'delete') {
!             push @{$transaction->notes('milter_header_changes')->{delete}},
                  $result->{header};
          }
--- 70,79 ----
              }
              else {
!                 push 
@{$self->qp->connection->notes('milter_header_changes')->{add}},
                          [$result->{header}, $result->{value}];
              }
          }
          elsif ($result->{action} eq 'delete') {
!             push 
@{$self->qp->connection->notes('milter_header_changes')->{delete}},
                  $result->{header};
          }
***************
*** 82,86 ****
          }
          elsif ($result->{action} eq 'replace') {
!             push @{$transaction->notes('milter_header_changes')->{replace}},
                      [$result->{header}, $result->{value}];
          }
--- 82,86 ----
          }
          elsif ($result->{action} eq 'replace') {
!             push 
@{$self->qp->connection->notes('milter_header_changes')->{replace}},
                      [$result->{header}, $result->{value}];
          }
***************
*** 219,223 ****
      return(DENY, $@) if $@;
! my $milter_header_changes = $transaction->notes('milter_header_changes'); foreach my $add (@{$milter_header_changes->{add}}) {
--- 219,223 ----
      return(DENY, $@) if $@;
! my $milter_header_changes = $self->qp->connection->notes('milter_header_changes'); foreach my $add (@{$milter_header_changes->{add}}) {

--
Eric Gerlach, Network Administrator
Federation of Students
University of Waterloo
p: (519) 888-4567 x36329
e: [EMAIL PROTECTED]

Reply via email to