Plugin for Joomla! to authenticate users against a mail server using IMAP, NNTP, or POP3.
GPL-2.0 License
This is a Joomla! plugin to authenticate users against a mail server via IMAP, NNTP, or POP3. It forwards authentication credentials provided by the user to a mail server, then relays the authentication decision of the mail server back to Joomla!.
In simpler terms, it lets users log in to Joomla! with the same username and password that they use for email, without the need to copy and synchronize the accounts manually.
To get debugging information from the Joomla! logs:
administrator/logs/everything.php
from the Joomla! directory on yourauthentication_mailbox
near the endimap_open
imap_errors
.
administrator/logs/everything.php
does not exist, check that theauthentication_mailbox
does not appear inadministrator/logs/everything.php
, check that "Authentication -If imap_open
can not
open the user's mailbox, it may be simpler to debug by calling
imap_open
from a
test script such as the following:
<?php
header('Content-Type: text/plain');
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);
$mailbox = imap_open(
'{imap.example.com/service=imap/tls/validate-cert}',
'myusername',
'mypassword',
0,
1);
print 'imap_open: ' . ($mailbox ? "Succeeded.\n" : "Failed.\n");
print 'imap_errors: ';
var_dump(imap_errors());
if ($mailbox) {
imap_close($mailbox);
}
Save the above code into a file (e.g. test.php
).
Adjust the
imap_open
parameters as necessary:
imap.example.com
with a valid server (and replace/service=imap
with /sevice=pop3
or /service=nntp
as necessary).myusername
and mypassword
with the username and password withOP_SECURE
from the flags parameter.Upload the file to a web server.
Visit the URL for the uploaded file in a web browser.
Repeat steps 2-4 until the page contains:
imap_open: Succeeded.
imap_errors: bool(false)
Adjust the plugin configuration to match the functional parameters.
Installation instructions are available in INSTALL.md. Major changes are listed in ChangeLog.txt. Complete license text is available in COPYING.txt.