[imp] problem creating a connection (IMAP/SSL)

Dwight Lee dwight@fontanus.com
Thu, 1 Mar 2001 15:04:59 -0500


Thanks for all your effort Chuck.  I was wondering if you could send me the
directions for applying this patch.

Once again, thanks for all your help.

Dwight Lee
Fontanus, Inc.

Phone:  201-239-7770 ext. 101
Mobile: 718-930-7644
Fax:    201-239-7771

-----Original Message-----
From: Chuck Hagenbuch [mailto:chuck@horde.org]
Sent: Thursday, March 01, 2001 2:24 AM
To: imp@lists.horde.org
Subject: RE: [imp] problem creating a connection (IMAP/SSL)


Quoting Dwight Lee <dwight@fontanus.com>:

> I'm using outlook 2000 with imap/ssl and it works fine.

Okay: here's the deal with imap/ssl connections and IMP. First: you need a
change in php itself, which I've committed to 4.0.5-dev. Here's the patch:


Index: config.m4
===================================================================
RCS file: /repository/php4/ext/imap/config.m4,v
retrieving revision 1.24
diff -u -r1.24 config.m4
--- config.m4   2001/02/26 15:17:12     1.24
+++ config.m4   2001/03/01 06:57:58
@@ -97,6 +97,7 @@
     fi

     if test "$PHP_IMAP_SSL" != "no"; then
+      AC_DEFINE(HAVE_IMAP_SSL,1,[ ])
       AC_ADD_LIBPATH($PHP_SSL_LIBDIR, IMAP_SHARED_LIBADD)
       AC_ADD_LIBRARY(ssl,, IMAP_SHARED_LIBADD)
       AC_ADD_LIBRARY(crypto,, IMAP_SHARED_LIBADD)
Index: php_imap.c
===================================================================
RCS file: /repository/php4/ext/imap/php_imap.c,v
retrieving revision 1.61
diff -u -r1.61 php_imap.c
--- php_imap.c  2001/02/26 16:36:08     1.61
+++ php_imap.c  2001/03/01 06:57:58
@@ -443,6 +443,10 @@
        mail_link(&newsdriver);      /* link in the news driver */
        mail_link(&philedriver);     /* link in the phile driver */
        auth_link(&auth_log);        /* link in the log authenticator */
+#ifdef  HAVE_IMAP_SSL
+       ssl_onceonlyinit ();
+       auth_link (&auth_ssl);       /* link in the ssl authenticator */
+#endif
 #endif
        mail_link(&dummydriver);     /* link in the dummy driver */
 #else


Next, you need to compile php --with-imap-ssl for this change to be
triggered.

Finally, you need the changes to IMP which I just committed. The short
version
is: if you have an actual, valid server cert for your imap or pop3 server,
then
just get the updates to IMP and PHP, and things should work fine.

HOWEVER: if you're using a self-signed cert, then you MUST add
/novalidate-cert
to the end of the protocol string. Otherwise c-client will reject the ssl
cert
and fail to authenticate. The "self-signed" options in the popup menu on the
login screen will now take care of this; if you're using a server list, then
for an imap/ssl server with a self-signed cert, the protocol entry should
be "imap/ssl/novalidate-cert"; for a pop3 one, it would be
"pop3/ssl/novalidate-
cert". This is also explained in config/servers.php.dist.

I have tested this with uw-imapd (imap-2000c). I didn't test the pop3d, but
I'm
pretty confident it will all work. So, if you've been trying to get this all
to
work, let me know if this fixes it. There are a bunch of steps, and I'm
happy
to answer questions, but please do read over this message and the other bits
(servers.php.dist) I mentioned carefully before saying it doesn't work. =)

G'night, everyone. ;)

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"We have no fuel on board, plus or minus 8 kilograms." -A NASA scientist

--
IMP mailing list: http://horde.org/imp/
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: imp-unsubscribe@lists.horde.org





>From chuck@horde.org Date: Thu,  1 Mar 2001 15:10:48 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact imp-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list imp@lists.horde.org
Received: (qmail 88074 invoked from network); 1 Mar 2001 20:11:48 -0000
Received: from 208-59-178-62.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com (HELO marina.horde.org) (208.59.178.62)
  by horde.org with SMTP; 1 Mar 2001 20:11:48 -0000
Received: by marina.horde.org (Postfix, from userid 33)
	id CFF6E3CA0; Thu,  1 Mar 2001 15:10:48 -0500 (EST)
Received: from 206.243.191.252 ( [206.243.191.252])
	as user chuck@marina.horde.org by marina.horde.org with HTTP;
	Thu,  1 Mar 2001 15:10:48 -0500
Message-ID: <983477448.3a9eacc88c836@marina.horde.org>
Date: Thu,  1 Mar 2001 15:10:48 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: imp@lists.horde.org
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 2.3.7-cvs
Subject: RE: [imp] problem creating a connection (IMAP/SSL)

Quoting Dwight Lee <dwight@fontanus.com>:

> Thanks for all your effort Chuck.  I was wondering if you could send me the
> directions for applying this patch.

Save it to a file (imap.patch), cd into php4/ext/imap/, and run:
patch -p0 < /path/to/imap.patch

Or, just update to php 4.0.5-cvs as of last night or later.

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"We have no fuel on board, plus or minus 8 kilograms." -A NASA scientist