[Rt-devel] using POP3 module for authentication

Joseph Spenner joseph85750 at yahoo.com
Tue Oct 4 16:45:40 EDT 2005


If RT is installed on a network with an existing
id/password system, it can present problems trying to
sync them.  Has anyone considered using POP3 to
authenticate?
I have a non-RT web application I wrote which requires
authentication to perform certain functions.  The way
I did this was to have my cgi use POP3 to hit our
internal exchange server.  It doesn't pull any email;
it just verifies that the user can authenticate, then
proceeds.
Something like:

use Mail::POP3Client;

$pop = new Mail::POP3Client
( USER=> "$accessid",
PASSWORD=> "$accesspw",
HOST=> "$popServer",
TIMEOUT => 60,
DEBUG=> 0, # set to 1 to diagnose trouble
  ) or warn "cannot open: $!";

$c = $pop->Count();
if ($c == -1) {
        bummer();
        }
}

'bummer' is a subroutine that prints a failure html
page, then exits.  $c should return the number of
messages the user has on the exchange/mail server.  If
it's -1, then auth failed.




		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


More information about the Rt-devel mailing list