Authentication using POP3 server

Authentication using POP3 server

by Esther Díez -
Number of replies: 7

Hi,

I´ve tried to autenticate users using a pop3 server, but when the user logs a blank page appears, no error, no response.

Any idea ?.

Regards

Average of ratings: -
In reply to Esther Díez

Re: Authentication using POP3 server

by Daniel Mikšík -
We would need more details on which type of the POP3 authentication method you used (try the most simple first, i.e. not secure connection), also ensure that you are using IP number, not the domain name for specifying the POP3 server; what worked for us (on one server) was the POP3NOTLS option.

The POP3 authentication in Moodle relies on the PHP IMAP functions, perhaps you could try to get some information on how they work at the php.net site and try to connect to your POP3 server using simple scripts that can be found at the IMAP_OPEN chapter of the PHP documentation - just to find out whether it is rather a Moodle-related problem or a server/PHP IMAP function problem. Actually, the most transparent test of your ability to connect to a POP3 server is to use the telnet connection (see the user contributed notes at the above mentioned PHP IMAP_OPEN documentation page).

In our installation, however, we were not able to connect at all to other POP3 server using the Moodle POP3 authentication. What worked in this case was a PHP extension class Net_POP3. Some changes to the Moodle authentication script /auth/pop3/lib.php are needed to get this working, I can post more details here if you would like to try this option.

Good luck! smile

Dan
In reply to Daniel Mikšík

Re: Authentication using POP3 server

by Rudy Scott -

I'd be interested in more details on setting up this option.  I'm experiencing the same problem with POP3 authentication (tried both simple and certified and have confirmed that I'm using IP numbers rather than domain names).

--Rudy

In reply to Daniel Mikšík

Re: Authentication using POP3 server

by Bruce Cole -
I am very interested in the possibility of being able to authenticate using a POP3 account on a server that does not support IMAP.
In reply to Bruce Cole

Re: Authentication using POP3 server

by Rudy Scott -

After a bit more research, it appears that the POP3 functions do not require IMAP (despite PHPs odd choice in naming the functions).  However they do require a library called "c-client" which may require a PHP recomiple.  Here's from the PHP manual:

Introduction

These functions are not limited to the IMAP protocol, despite their name. The underlying c-client library also supports NNTP, POP3 and local mailbox access methods.

Requirements

This extension requires the c-client library to be installed. Grab the latest version from ftp://ftp.cac.washington.edu/imap/ and compile it.

It's important that you do not copy the IMAP source files directly into the system include directory as there may be conflicts. Instead, create a new directory inside the system include directory, such as /usr/local/imap-2000b/ (location and name depend on your setup and IMAP version), and inside this new directory create additional directories named lib/ and include/. From the c-client directory from your IMAP source tree, copy all the *.h files into include/ and all the *.c files into lib/. Additionally when you compiled IMAP, a file named c-client.a was created. Also put this in the lib/ directory but rename it as libc-client.a.

Note: To build the c-client library with SSL or/and Kerberos support read the docs supplied with the package.

Installation

To get these functions to work, you have to compile PHP with --with-imap[=DIR], where DIR is the c-client install prefix. From our example above, you would use --with-imap=/usr/local/imap-2000b. This location depends on where you created this directory according to the description above. Windows users may include the php_imap.dll DLL in php.ini

Note: Depending how the c-client was configured, you might also need to add --with-imap-ssl=/path/to/openssl/ and/or --with-kerberos=/path/to/kerberos into the PHP configure line.

Average of ratings:Useful (1)
In reply to Rudy Scott

Re: Authentication using POP3 server

by Vincenzo Della Mea -
Perhaps late, but I discovered that on Debian I need not only the c-client library (libc-client2002edebian), but mainly the developer component (libc-client-dev). As Apache is not automatically restarted after apt-get installation, you have to do a apache2ctl restart. This may be of help to someone.

In reply to Bruce Cole

Re: Authentication using POP3 server

by James Dugal -
For what it's worth, I have no problems using plain old POP3 with our Qpopper 4.0.5 server from
Qualcomm.  I did want to automatically obtain the user's name (via finger) and set their email address for them, so I added a PHP subroutine to auth/pop3/lib.php to do this.