develooper Front page | perl.qpsmtpd | Postings from June 2005

Re: NOT reject authenicated users?

Thread Previous | Thread Next
From:
John Peacock
Date:
June 20, 2005 08:51
Subject:
Re: NOT reject authenicated users?
Message ID:
42B6E624.8090501@rowman.com
Keith Ivey wrote:
> Why doesn't ->relay_client() check for $ENV{RELAYCLIENT}?  Without that, 
> it seems you have to add ' || exists($ENV{RELAYCLIENT}' every time you 
> use it.
> 

My bad, I shouldn't have included that at all!  This is sufficient:

	if ( $connection->relay_client() )

because of the code in plugin/check_relay (which is presumed to be run 
before other connect plugins anyways):

>   while ($client_ip) {
>     if (exists($ENV{RELAYCLIENT}) or
>         exists($relay_clients{$client_ip}) or
>         exists($more_relay_clients->{$client_ip}))
>     {
>       $connection->relay_client(1);
>       last;
>     }

There is no reason to set the %ENV variable once you are inside Qpsmtpd 
itself (for example if you were using tcpserver to set the $RELAYCLIENT).

John



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About