kevinoid / auth-mailbox-joomla

Plugin for Joomla! to authenticate users against a mail server using IMAP, NNTP, or POP3.
GNU General Public License v2.0
6 stars 0 forks source link

Any solution about multiple POP3 servers ? #3

Open allensph opened 12 years ago

allensph commented 12 years ago

We have 4 email servers with different mail domains in our school, is it possible to add multiple POP3 servers in this tool ?

Thanks a lot.

kevinoid commented 12 years ago

Can you describe in a bit more detail how you would like the software to interact with the multiple mail servers? I would guess you are looking for one of the following scenarios:

  1. The plugin attempts to login to each configured mail server and grants access if any of them succeed (union of users across multiple mail servers).
  2. The plugin attempts to login to each configured mail server and grants access if all of them succeed (intersection of users across multiple mail servers).
  3. The plugin attempts to connect to one of the configured mail servers (at random) and uses the result of the single connection attempt (for load-balancing).
  4. Something else?
allensph commented 12 years ago

Yes, the status 1 is what I'm talking about. That well be great if we can add/remove servers in admin panel. (Consider to most situations, each server have different options.)

Plz feel free to let me know if something is not clear. Thanks again for your kind response.

kevinoid commented 12 years ago

I've been playing around with a few possible solutions and considering the issue and here's the conclusion I have come to for the moment:

The ideal implementation (in my view) would be for Joomla! CMS to support multiple instances of authentication plugins. The problem is not specific to this plugin and it would make sense to authenticate against multiple LDAP servers, multiple databases, etc. for many plugin types. It is also the most elegant, since all of the parameters could theoretically be different for each server. However, I do not have the time available to advocate for or implement this solution.

I am also hesitant to add the code for multiple servers (as fallback, with shared parameter values) to the plugin for 2 main reasons: The first is that I don't see this as a major use case (correct me if I am wrong about this - both OP and future users who see this bug and want to add their vote). In my experience, this would be handled by a load-balancer or frontend/backend setup allowing users to access multiple servers through a single name rather than instructing users to use different servers (although I have seen this in academia). The other, more trivial, reason is that there is no elegant way to do it. Joomla! does not support a multiple-text-value parameter type, so it would require parsing a textarea field or creating a custom parameter type, which are both less than ideal.

However, that being said, it shouldn't be hard to simply copy the code for the plugin and rename it to "mailbox2" "mailbox3" etc to get the equivalent of multiple instances of the plugin running simultaneously. If you are interested in this solution, I'd be happy to assist you in making it work. (If so, send me a message to coordinate - if others are interested as well, I'll put up a wiki page and/or reconsider implementing this feature.)

allensph commented 12 years ago

Greetings! Thanks for your reply.

For years, developers using POP3 authentication for almost all academic information systems, and keep 4 different mail domain in campus at the same time( for some "history" or "politic" issues, aha) , but NO LDAP server.. in most case, they provide an ugly drop down list in login form to let users choosing their mail sub-domain, "instructing users to use different servers", like you said.

That's my problem: I am trying build something in Joomla for campus, and keep POP3 authentication for users habit, but there's no LDAP service.So, it's important for me to find solutions, or Joomla won't be an option at all.

I've tried a little hack around codes, but it's not working. I'm interested in any possible solution, and it will be nice if you can explain more details about it. Thank you.

kevinoid commented 12 years ago

Sure, I can put up a version of auth-mailbox-joomla with the appropriate changes made so that you can use it as a reference (or just drop it in). Which version of Joomla! are you using?

allensph commented 12 years ago

I am using version 2.5.4

kevinoid commented 12 years ago

Ok. I've uploaded auth-mailbox-joomla-1.0.5-multiple-instances.zip which contains 4 copies of auth-mailbox-joomla which can be installed simultaneously. To use it, download the file and unzip it, then install each of the 4 zip files using the Joomla! Extension Manager, then enable and configure each of the plugin instances using the Plug-in Manager with each plugin authenticating against a different server. Let me know how that works for you.

kevinoid commented 10 years ago

Sorry, closed the wrong issue from a recent commit. This feature is still pending. Sorry for the nosie.

allensph commented 9 years ago

Hello Kevin, thanks for your help! sorry for not giving you a prompt reply. The multiple instances works well on Joomla 2.5.4 but not support on 3.4.1 today. Is it possible to have a multiple instance version for Joomla 3.4 ? Thank you.

mperaya commented 5 years ago

Hello.

Here you have a modified version of plugin that works for multiple mailboxes targets. This version of the plugin works on Joomla 3.6+:

auth-mailbox-joomla-1.1.1.zip

kevinoid commented 5 years ago

If anyone following this issue would like to comment on #13, your input would be appreciated.