Extremely irritating patch that works, and yet doesn't.

2004-07-26 Thread Sahil Tandon
Attached is a patch file, that exists in my ports tree, specifically 
/usr/ports/mail/imap-uw/files.  After running 'make install', the 
binaries are put in place and I am able to connect to the server and 
read mail just fine.

However, there is one portion of the patch that doesn't seem to "make 
it" to the final binary:

| -CREATEPROTO=unixproto
| +CREATEPROTO=mbxproto
Moreover, even though I can verify the patch is "applied" to the Makefile:
| sphinx# grep CREATEPROTO= src/osdep/unix/Makefile
| CREATEPROTO=mbxproto
|  CREATEPROTO=mmdfproto EMPTYPROTO=mmdfproto \
|  CREATEPROTO=mmdfproto EMPTYPROTO=mmdfproto \
|  CREATEPROTO=mmdfproto EMPTYPROTO=mmdfproto \
|  CREATEPROTO=mmdfproto EMPTYPROTO=mmdfproto \
| echo -DCREATEPROTO=$(CREATEPROTO) -DEMPTYPROTO=$(EMPTYPROTO) \
... it doesn't seem to work, because when I connect to the server again 
via IMAP, and create some new folders, they're all created in the 
traditional UNIX mailbox format, and not in mbx.

FWIW, I'm running FreeBSD-4.10STABLE, and compiling imap-2004 
against/with cclient-2004.  Thanks for your help and suggestions.

Regards,
Sahil
--- src/osdep/unix/Makefile.origThu Apr 29 19:08:48 2004
+++ src/osdep/unix/Makefile Mon Jul 26 19:44:07 2004
@@ -21,7 +21,7 @@
 # Command line build parameters
 
 EXTRAAUTHENTICATORS=
-EXTRADRIVERS=mbox
+EXTRADRIVERS=
 PASSWDTYPE=std
 SSLTYPE=nopwd
 IP=4
@@ -29,13 +29,13 @@
 
 # Extended flags needed for SSL.  You may need to modify.
 
-SSLDIR=/usr/local/ssl
-SSLCERTS=$(SSLDIR)/certs
+SSLDIR=$(OPENSSLBASE)
+SSLCERTS=$(PREFIX)/certs
 SSLKEYS=$(SSLCERTS)
-SSLINCLUDE=$(SSLDIR)/include
-SSLLIB=$(SSLDIR)/lib
+SSLINCLUDE=$(OPENSSLINC)
+SSLLIB=$(OPENSSLLIB)
 
-SSLCRYPTO=-lcrypto
+SSLCRYPTO=-lcrypto -lcrypt
 
 # Older versions of MIT Kerberos also have a libcrypto.  If so, you may need
 # to use this instead
@@ -48,7 +48,7 @@
 
 SSLCFLAGS= -I$(SSLINCLUDE) -I$(SSLINCLUDE)/openssl\
  -DSSL_CERT_DIRECTORY=\"$(SSLCERTS)\" -DSSL_KEY_DIRECTORY=\"$(SSLKEYS)\"
-SSLLDFLAGS= -L$(SSLLIB) -lssl $(SSLCRYPTO) $(SSLRSA)
+SSLLDFLAGS= # -L$(SSLLIB) -lssl $(SSLCRYPTO) $(SSLRSA)
 
 
 # Extended flags needed for non-standard passwd types.  You may need to modify.
@@ -62,7 +62,7 @@
 # AFSLDFLAGS may also need -L/usr/ucblib -lucb
 DCECFLAGS= -DDCE_MINIMAL -DPASSWD_OVERRIDE=\"/opt/pop3/passwd/passwd\"
 DCELDFLAGS= -ldce
-PAMLDFLAGS= -lpam -ldl
+PAMLDFLAGS= # -lpam -lcrypt
 
 
 # Build parameters normally set by the individual port
@@ -92,14 +92,14 @@
 # set certain other formats (e.g. mbx and mx) as the EMPTYPROTO since these
 # formats can never be empty files.
 
-CREATEPROTO=unixproto
+CREATEPROTO=mbxproto
 EMPTYPROTO=unixproto
 
 
 # Commands possibly overriden by the individual port
 
 ARRC=ar rc
-CC=cc
+CC?=cc
 LN=ln -s
 RANLIB=ranlib
 
@@ -117,7 +117,7 @@
  dummy.o pseudo.o netmsg.o flstring.o fdstring.o \
  rfc822.o nntp.o smtp.o imap4r1.o pop3.o \
  unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o
-CFLAGS=-g
+CFLAGS+=$(BASECFLAGS) $(EXTRACFLAGS)
 
 CAT=cat
 MAKE=make
@@ -200,6 +200,15 @@
 BASECFLAGS="-g -B/usr/lib/big/ -Dvoid=char -Dconst=" \
 RANLIB=true ARRC="ar -rc"
 
+bfp:   # FreeBSD Pluggable Authentication Modules
+   $(BUILD) `cat SPECIALS` OS=bsi SIGTYPE=psx CHECKPW=pam \
+SPOOLDIR=/var \
+ACTIVEFILE=/usr/local/news/lib/active \
+RSHPATH=/usr/bin/rsh \
+LOCKPGM=$(PREFIX)/libexec/mlock \
+BASECFLAGS="-DNFSKLUDGE" \
+BASELDFLAGS="-lpam -lcrypt"
+
 bs3:   # BSD/i386 3.0 or higher
$(BUILD) `$(CAT) SPECIALS` OS=bsi \
 CHECKPW=bsi LOGINPW=bsi CRXTYPE=nfs \
@@ -219,8 +228,9 @@
 SPOOLDIR=/var \
 ACTIVEFILE=/usr/local/news/lib/active \
 RSHPATH=/usr/bin/rsh \
-BASECFLAGS="-g -O -pipe" \
-BASELDFLAGS="-lcrypt"
+LOCKPGM=$(PREFIX)/libexec/mlock \
+ BASECFLAGS="-DNFSKLUDGE" \
+ BASELDFLAGS=""
 
 bsi:   # BSD/i386
$(BUILD) `$(CAT) SPECIALS` OS=$@ \
@@ -788,7 +798,7 @@
 
 build: clean once $(ARCHIVE)
 
-all:   $(ARCHIVE)
+all:   onceenv
 
 $(ARCHIVE): $(BINARIES)
sh -c '$(RM) $(ARCHIVE) || true'


Re: can't seem to get pop starttls working

2004-07-26 Thread Matt Selsky
pop with starttls works when I force the use of TLSv1.

$ openssl s_client -connect mailtest:110 -starttls pop3 -tls1

I guess the client I was testing is broken.  But my original openssl 
command worked for starttls against a non-UWash pop3 server.


On Mon, Jul 26, 2004 at 03:27:44AM -0400, Matt Selsky wrote:
> I built imap-2004a on Solaris 9 (OpenSSL 0.9.7d) like so:
> 
> $ make gso PASSWDTYPE=pmb SSLTYPE=nopwd SSLDIR=/opt/local \
>   SSLCERTS=/var/ssl EXTRALDFLAGS='-R/opt/local/lib'
> 
> I'm able to connect securely via port 995 (pop3s), but I can't connect 
> via 110 using starttls.
> 
> $ openssl s_client -connect mailtest:110 -starttls pop3 
> CONNECTED(0004)
> 16910:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:226:
> 
> When I connect via netcat, and issue the capabilities command, I see 
> starttls listed, but I get an immediate OK response when I issue the 
> STLS command:
> 
> $ nc mailtest 110
> +OK POP3 mailtest 2004.88 server ready
> CAPA
> +OK Capability list follows:
> TOP
> LOGIN-DELAY 180
> UIDL
> STLS
> .
> STLS
> +OK STLS completed
> 
> IMAP is working for both starttls and ssl.  How can I debug this 
> further?
> 
> Thanks.
> -- 
> --
>  For information about this mailing list, and its archives, see: 
>  http://www.washington.edu/imap/c-client-list.html
> --


can't seem to get pop starttls working

2004-07-26 Thread Matt Selsky
I built imap-2004a on Solaris 9 (OpenSSL 0.9.7d) like so:

$ make gso PASSWDTYPE=pmb SSLTYPE=nopwd SSLDIR=/opt/local \
  SSLCERTS=/var/ssl EXTRALDFLAGS='-R/opt/local/lib'

I'm able to connect securely via port 995 (pop3s), but I can't connect 
via 110 using starttls.

$ openssl s_client -connect mailtest:110 -starttls pop3 
CONNECTED(0004)
16910:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:226:

When I connect via netcat, and issue the capabilities command, I see 
starttls listed, but I get an immediate OK response when I issue the 
STLS command:

$ nc mailtest 110
+OK POP3 mailtest 2004.88 server ready
CAPA
+OK Capability list follows:
TOP
LOGIN-DELAY 180
UIDL
STLS
.
STLS
+OK STLS completed

IMAP is working for both starttls and ssl.  How can I debug this 
further?

Thanks.
-- 
--
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
--