SYNOPSIS
Inside the AuthServer.cf file:
$cfg = \%PAPI::AuthServer::cfgVar;
$$cfg{workingDirectory} = "/usr/local/PAPI/AS/etc";
. . . $$cfg{authenticationHook} = \&PAPI::POPAuth::POP3User; $$cfg{credentialHook} = \&PAPI::BasicAuth::AllSites; $$cfg{attrRequestHook} = \&PAPI::BasicAuth::DefAttributes; $$cfg{pop3Server} = "pop.dom.ain"; $$cfg{basicAuthDB} = "Basic.pdb";
REQUIRES
Mail::POP3Client
DESCRIPTION
These functions implement PAPI user authentication using the POP3 protocol. Credential data provision must use different mechanisms, found in other modules.
FUNCTIONS
- POP3user($con, $cfg)
- This function is intended to be hooked at the authenticationHook in a PAPI AuthServer. It uses the connection variables username and password to validate them against the POP3 server defined by the configuration variable pop3Server (``pop'' by default).
- The method used for the validation process depends on the value of the variable pop3Method:
- PASS: Use normal POP3 login (send USER and PASS commands), this is the default.
- APOP: Use the APOP procedure.
- CRAM-MD5: Use CRAM-MD5 when sending the password.
- BEST: Query server capabilities and select the best available method (preference order is APOP, CRAM-MD5, and PASS)
- It is also possible to enable the use of TLS/SSL in the connection to the server by setting the variable pop3SSL to 1.
- The username returned to the AuthServer depends on the configuration variable pop3UID, that may take the values:
- POPUSER, the format is ``username'' (this is the default).
- POPSERVER, the format is ``username@pop3Server''.
- Arguments:
- $con: Hash with the PAPI AuthServer connection variables.
- $cfg: Hash with the PAPI AuthServer configuration variables.