> b. Plugins which authenticates the user (like my qppoprelay) will not
>    be called at RCPT TO level but on start of the connection. They also
>    can set session->authenticated.

Ok, i just tried that with my 'qppoprelay' plugin (updated version at
http://qpsmtpd.kju.de/). It will now be called from the connection hook. If
the user has authenticated itself before via POP3, it will now do:

      $ENV{'RELAYCLIENT'} = '';
      $self->qp->connection->notes('authuser', $user);
      $self->qp->connection->notes('authmethod', 'pop-before-smtp');

In any case the plugin will return 'DECLINED'. Now i'm still not happy with
the $ENV{'RELAYCLIENT'} = ''; part, because in my opinion using an
environment variable to signal relaying to the rest of qpsmtpd is bad
practice. I would like to be able to replace this with either:

      $self->qp->connection->authenticated(1);  -or-
      $self->qp->connection->relaying(1);       

Maybe it would make sense to implement _both_ variables, because i see a
difference between an authenticated user and an relaying user. I also
suggest to set session->relaying to 1 on start of a new session if
connection->relaying is 1.

This allows to flexible either set relaying for a whole session (like it is
now done with $ENV{'RELAYCLIENT'} by Auth.pm and qppoprelay, or on a session
base.


-kju

-- 
      It's an insane world, but i'm proud to be a part of it. -- Bill Hicks

Reply via email to