MailWatch icon indicating copy to clipboard operation
MailWatch copied to clipboard

Other external authentication mechanisms

Open elvch01 opened this issue 9 years ago • 7 comments

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?

elvch01 avatar Apr 26 '16 10:04 elvch01

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)

endelwar avatar Apr 26 '16 12:04 endelwar

Can I also add to this the ability to configure different authentication servers for different domains would be a huge benefit.

asuweb avatar Jan 03 '17 09:01 asuweb

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).

sriccio avatar Apr 03 '18 02:04 sriccio

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)

dwfallin avatar Aug 11 '18 19:08 dwfallin

:) 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!

dwfallin avatar Aug 11 '18 20:08 dwfallin

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.

sriccio avatar Aug 12 '18 06:08 sriccio

thanks much @sriccio, i think i'm good for now - my quick fix will hold fine until v2 (with your changes?) comes out!

dwfallin avatar Aug 12 '18 20:08 dwfallin