Re: IMAP Authentication [SOLVED]
jjs - mainphrame <[email protected]> Sat, 30 Jan 2021 15:56:27 -0800
| Newsgroups | gmane.mail.virus.maiamailguard |
|---|---|
| Message-ID | <CABkzw7x87YV_yudMcsHfOs4zNB03hRzxkEop8NJjVN2Zk4_+nQ@mail.gmail.com> |
Very cool! This is good to know. Apparently the imap auth code is still intact. Jake On Sat, Jan 30, 2021 at 3:50 PM Derek Atkins <[email protected]> wrote: > Hi, > > Looking at auth.php, there is zero change in the code of auth_imap() > between my old system and the new code. > > Is there some way to get maia/php to output / log more of what it's doing? > I uncommented the two echo() commands in there, but I'm not seeing any > output anywhere. > > ........ > > But I just figured it out. Modern IMAP uses STARTTLS, so even if I'm on > port 143 it'll **TRY** TLS.. And I found /var/log/php-fpm/www-error.log > which had this interesting tidbit: > > PHP Warning: stream_socket_enable_crypto(): Peer certificate CN=`<mail > server>' did not match expected CN=`localhost' in > /usr/share/pear/Net/IMAPProtocol.php on line 3760 > > I changed config.php from "localhost" to the certificate FQDN and.. > voila.. I could login using IMAP auth! YAY. > > All working now. > > -derek > > On Sat, January 30, 2021 6:21 pm, jjs - mainphrame wrote: > > Speaking from my own experience working with maia since 2005, I've never > > used anything but internal authentication. > > > > I'm not sure if the corner case of imap auth is well maintained, or > > survived the conversion to FOSS intact. > > > > Hopefully if someone on this list is using imap, they can share their > > insights. > > > > Jake > > > > On Sat, Jan 30, 2021 at 1:19 PM Derek Atkins <[email protected]> wrote: > > > >> HI, > >> > >> I am in the process of setting up a new Maia system (FINALLY) to replace > >> my old 1.0.2{something} system running on a different machine. I've > >> started from scratch, with a fresh maia database. That all is working > >> great. But now I'm trying to convert authentication from internal to > >> imap > >> (which is how I had it configured on the old system). > >> > >> I installed php-pear-Net-IMAP and php-imap. > >> The configtest.php says PEAR::Net_IMAP and IMAP library are both "OK". > >> I have the same username as I did on the old system. > >> I am PRETTY sure I have IMAP set up the same as I did on the old system. > >> I can log into squirrelmail on the new system, so I know IMAP *can* > >> authenticate (and that I know the password). > >> However, when I change config.php to say $auth_method = "imap"; I can no > >> longer login to maia. > >> > >> A few things to note: on Maia I always use <user>@<domain> to login. > >> On > >> Squirrelmail I use <user>. This is the same <user>. This worked on > >> the > >> old server, but isn't working now. > >> > >> From the logs, I can see that there is a connection to IMAP, but I can't > >> see anything beyond that. I don't see an error message or even a login > >> attempt failure. The maillog logs just say: > >> > >> Jan 30 16:08:48 mail cyrus/imap[14657]: inittls: Loading hard-coded DH > >> parameters > >> Jan 30 16:08:48 mail cyrus/imap[14657]: starttls: TLSv1.3 with cipher > >> TLS_AES_256_GCM_SHA384 (256/256 bits new) no authentication > >> > >> When I login via squirrelmail I then get: > >> > >> Jan 30 15:25:41 mail cyrus/imaps[804]: login: <HOST> [X.X.X.X] <user> > >> plaintext+TLS User logged in SESSIONID=<cyrus-804-1612038341-1-....> > >> > >> I don't see anything like this from maia. And after the page "times > >> out" > >> I have an empty "xlogin.php" screen. > >> > >> If I change the imap host and port to ssl://<hostname> and port 993, > >> then > >> I get xlogin.php that says: > >> > >> Login for user <user> failed. > >> ( not connected! (CMD:LOGIN) ) > >> [ Try again ] , or contact <admin> for assistance. > >> > >> This happens regardless of whether I set it up to talk to the new IMAP > >> server OR the old IMAP server.... > >> > >> What do I need to do to debug this and get it working? > >> > >> -derek > >> > >> -- > >> Derek Atkins 617-623-3745 > >> [email protected] www.ihtfp.com > >> Computer and Internet Security Consultant > >> > >> _______________________________________________ > >> Maia-users mailing list > >> [email protected] > >> http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users > >> > > > > > -- > Derek Atkins 617-623-3745 > [email protected] www.ihtfp.com > Computer and Internet Security Consultant > > _______________________________________________ Maia-users mailing list [email protected] http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users