> Fritz - how would you feel about putting in a fail-safe in there that 
> aborts the connection to listenPort2/smtpAuthServer if the client isn't 
> authenticated?  I've tried to hack around quickly in the code, but am not 
> sure how to get the connection to abort gracefully to test out my theory. 
> But I would see it as something like:

Actually, after playing around with it some more, I realized I was looking 
in the wrong place.

Fritz - can you determine if something like this would be okay?  I inserted 
the following at line 3190 in 1.2.6 build 38 to read the following:

  if( ($this->{localport} == $listenPort2 && $smtpAuthServer ne '' ) && 
!($this->{relayok}) ) {
   sendque($fh, "You must be authenticated to send mail via this 
port.\r\n");
   mlog($fh,"must first be authenticated to send email via this port 
$listenPort2.");
   return;
  }

to disable sending mail via listenPort2 without being authenticated.  I 
guess one could also add statistics, etc, but I was just trying to get 
something quick up and running.

The next step would be to add a user parameter to enable/disable this.  So I 
added the following to line 106:
[smtpAuthServerAuthConnectionsOnly,'Allow AUTH connections to SMTP Auth 
Destination ONLY',0,checkbox,0,'(.*)',undef,
'Only allows authenticated connections to send mail through the SMTP Auth 
Destination.  Requires "Another Listen Port" and "SMTP Auth Destination". 
Otherwise does nothing.'],


Finally, the new if statement gets modified to take use 
smtpAuthServerAuthConnectionsOnly.  Ex: if( 
$smtpAuthServerAuthConnectionsOnly && .... )


Does that sound reasonable / okay?

Thanks!

Eric





-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Assp-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/assp-user

Reply via email to