Other external authentication mechanisms
Hi
I am thinking about extending check_login.php to allow SMTP and/or IMAP authentication of users. I run MailScanner on a front-end relay server with all my mail users defined at the back end server. It would be quite slick if users could simply use their existing SMTP/IMAP credentials to login to MailWatch.
It does not look a huge code change because the code for LDAP auth is there and it would simply be a case of changing the call to ldap_authenticate() at line 48 in checklogin.php to an equivalent function which uses IMAP or SMTP
Does this sound a sensible idea?
Hi @elvch01 thanks for your submission, this is really a needed step to take and it is already in the todo list for version 2, where there will be a single class for auth with several adapter (db, ldap, smtp, imap, pop3)
Can I also add to this the ability to configure different authentication servers for different domains would be a huge benefit.
If that is of some interrest, I've modded MailWatch to be able to check the login through IMAP with support of multiple servers (based on what's in postfix transport file to determine which server to query).
i'm VERY interested in this option - i'm evaluating mailwatch and have many domains with multiple mail server (running different software), and being able to authenticate via imap/ldap/smtp on different servers per domain would seal the deal for me. @sriccio - can you share the changes you made (i'm looking at v1.2.10)
:) never mind - i made a quick change to imap_authenticate() and conf.php and got what i needed - different auth servers per domain. sriccio's solution (using the postfix transport to determine host) is def a better solution, but at least i can move forward for now!
hi @dwfallin, I could do a diff of my changes and share it if you need, but it's based on mailwatch installed by EFAv3 which is based on mw 1.2.7 with some changes if i'm not wrong.
Not really sure it would be useful for you but if you think so tell me and I'll arrange this.
thanks much @sriccio, i think i'm good for now - my quick fix will hold fine until v2 (with your changes?) comes out!