Ticket #38 (new enhancement)

Opened 11 years ago

Last modified 10 years ago

Support for per-domain authentication sources and methods

Reported by: rjl Owned by: rjl
Priority: normal Milestone: 1.1.0
Component: PHP scripts Version: 1.0.0 RC5
Severity: normal Keywords: authentication source method domain pop3 imap exchange ldap internal


Ideally, in the common scenario in which each domain represents a downstream customer with his own authentication source, it would be nice to let that be configured as a domain-based property in Maia.

That is, domain1 might authenticate via POP3 at pop3.domain1.com, whereas domain2 might authenticate via LDAP at mail.domain2.net, and so on.

Change History

Changed 10 years ago by dmorton

  • milestone changed from 1.0.0 to 1.1.0

Changed 10 years ago by rjl

  • patch set to 0

Richard Whittaker suggested a crude way to accomplish this, at least for authenticating against different servers of the same type. His solution involved reading/setting a cookie that indicates which server to authenticate against. Note that this code was submitted in 2004, and may not work as-is with modern versions of Maia.

In config.php:

if (!isset($_COOKIE['podomain'])) {
    setcookie ("podomain",$domain);
$podomain = $_COOKIE['podomain']; 
if (($podomain == whse) || (!$podomain)) { 
    $auth_imap_params = "{server1:143/imap/norsh/notls}INBOX";
if ($podomain == ylkn) { 
    $auth_imap_params = "{server2:143/imap/norsh/notls}INBOX";

if (!$auth_imap_params) { 
    $auth_imap_params = "{server1:143/imap/norsh/notls}INBOX";

The same principle could be used to authenticate against multiple SQL, LDAP, or POP3 servers of course, as long as they're all servers of the same type.

Note: See TracTickets for help on using tickets.