- update to the latest stable version (2006j2)

- take over maintainership (ok jacob@)
- add a new c-client subpackage to replace old mail/c-client which was
built from pine sources

feedbacks from sthen@ and simon@
testing and ok robert@
This commit is contained in:
ajacoutot 2007-10-30 10:12:41 +00:00
parent d89285f3f2
commit a7b1b50200
11 changed files with 278 additions and 58 deletions

View File

@ -1,20 +1,27 @@
# $OpenBSD: Makefile,v 1.54 2007/10/22 12:42:57 naddy Exp $
# $OpenBSD: Makefile,v 1.55 2007/10/30 10:12:41 ajacoutot Exp $
COMMENT-server= University of Washington IMAP4rev1/POP2/POP3 mail servers
COMMENT-mailutil= University of Washington IMAP4rev1/POP2/POP3 mail utility
COMMENT-c-client= University of Washington's c-client mail access routines
VERSION= 2006d
DISTNAME= imap-2006d
BASEVER= 2006j
VERSION= ${BASEVER}2
DISTNAME= imap-${VERSION}
PKGNAME-server= imap-uw-${VERSION}
PKGNAME-mailutil= mailutil-uw-${VERSION}
PKGNAME-c-client= c-client-${VERSION}
PKGNAME-server= imap-uw-${VERSION}p0
PKGNAME-mailutil= mailutil-uw-${VERSION}p0
CATEGORIES= mail
CATEGORIES-c-client= mail devel
SHARED_LIBS= c-client 5.0
EXTRACT_SUFX= .tar.Z
HOMEPAGE= http://www.washington.edu/imap/
MAINTAINER= Jakob Schlyter <jakob@openbsd.org>
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
MASTER_SITES= ftp://ftp.cac.washington.edu/imap/ \
ftp://ftp.cac.washington.edu/imap/old/ \
@ -26,12 +33,17 @@ PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= asn1 c com_err crypto des gssapi kafs krb5 ssl
WANTLIB-c-client=
WRKDIST= ${WRKDIR}/imap-${BASEVER}
ALL_TARGET= bso
MAKE_FLAGS= EXTRACFLAGS="${CFLAGS}" EXTRAAUTHENTICATORS="gss" IP=6
SHLIB= libc-client.so.${LIBc-client_VERSION}
MAKE_FLAGS= EXTRACFLAGS="${CFLAGS}" EXTRAAUTHENTICATORS="gss" IP=6 \
SHLIB="${SHLIB}" SHLIBNAME=${SHLIB} CC="${CC}"
MULTI_PACKAGES= -server -mailutil
MULTI_PACKAGES= -server -mailutil -c-client
SUBPACKAGE?= -server
FLAVORS= plaintext
@ -45,17 +57,17 @@ MAKE_FLAGS+= SSLTYPE="unix.nopwd"
NO_REGRESS= Yes
DOCDIR= share/doc/imap-uw
DOCFILES= FAQ.txt FAQ.html commndmt.txt drivers.txt formats.txt \
imaprc.txt md5.txt mixfmt.txt naming.txt RELNOTES
post-configure:
touch ${WRKSRC}/ip6
HEADERS= c-client.h dummy.h env.h env_unix.h fdstring.h flockcyg.h \
flocksim.h flstring.h fs.h ftl.h imap4r1.h linkage.c linkage.h \
mail.h misc.h netmsg.h newsrc.h nl.h nntp.h osdep.h pseudo.h \
rfc822.h smtp.h sslio.h tcp.h tcp_unix.h unix.h utf8.h \
utf8aux.h
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/imapd/imapd ${PREFIX}/libexec
${INSTALL_PROGRAM} ${WRKSRC}/ipopd/ipop2d ${PREFIX}/libexec
${INSTALL_PROGRAM} ${WRKSRC}/ipopd/ipop3d ${PREFIX}/libexec
${INSTALL_PROGRAM} ${WRKSRC}/mlock/mlock ${PREFIX}/libexec
${INSTALL_PROGRAM} ${WRKSRC}/dmail/dmail ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/mailutil/mailutil ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/tmail/tmail ${PREFIX}/bin
@ -64,9 +76,21 @@ do-install:
${INSTALL_MAN} ${WRKSRC}/src/dmail/dmail.1 ${PREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/src/mailutil/mailutil.1 ${PREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/src/tmail/tmail.1 ${PREFIX}/man/man1
${INSTALL_DATA_DIR} ${PREFIX}/${DOCDIR}
.for f in ${DOCFILES}
${INSTALL_DATA} ${WRKSRC}/docs/${f} ${PREFIX}/${DOCDIR}
.endfor
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/imap-uw
tar -C ${WRKSRC}/docs -cf - . | \
tar -C ${PREFIX}/share/doc/imap-uw -xf -
chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/doc/imap-uw
${INSTALL_DATA_DIR} ${PREFIX}/include/c-client
cd ${WRKSRC}/c-client; ${INSTALL_DATA} ${HEADERS} \
${PREFIX}/include/c-client
${INSTALL_DATA} ${WRKSRC}/c-client/c-client.a \
${PREFIX}/lib/libc-client.a
@if [ -f ${WRKSRC}/c-client/${SHLIB} ]; then \
${INSTALL_DATA} ${WRKSRC}/c-client/${SHLIB} ${PREFIX}/lib; \
fi
.include <bsd.port.mk>
.if defined(NO_SHARED_LIBS) && ${NO_SHARED_LIBS:L} == "yes"
MAKE_ENV+= NO_SHARED_LIBS=Yes
.endif

View File

@ -1,5 +1,5 @@
MD5 (imap-2006d.tar.Z) = 2yjaUYaY7ABu2/xclrvtKA==
RMD160 (imap-2006d.tar.Z) = D06PDWVkd14L8+NRYsusDJ6Vg0M=
SHA1 (imap-2006d.tar.Z) = By+8gNiNx/NGtHCsFX81/Aw4dDQ=
SHA256 (imap-2006d.tar.Z) = gHyMxeZHZdVCWfP4pxWC809/3L7HlTlaevzxlfGM1ME=
SIZE (imap-2006d.tar.Z) = 2692289
MD5 (imap-2006j2.tar.Z) = 15AGkcQVvMclwb8rFeT7mQ==
RMD160 (imap-2006j2.tar.Z) = kZJyClJ+iXfvbj62vPjzsmaA5Pw=
SHA1 (imap-2006j2.tar.Z) = Qfw/jPEfGTGpwEYkC8BM658UFsA=
SHA256 (imap-2006j2.tar.Z) = Wy7SR/2Y+Bx6LSPQgi9gLUm3QsGXYanC2tZ1P18+gG4=
SIZE (imap-2006j2.tar.Z) = 2686745

View File

@ -1,17 +1,16 @@
$OpenBSD: patch-Makefile,v 1.9 2007/01/10 09:27:34 jakob Exp $
--- Makefile.orig Thu Nov 30 23:27:41 2006
+++ Makefile Fri Jan 5 15:26:30 2007
@@ -320,8 +320,7 @@ aos art asv aux bsd cvx dpx dyn isc pyr
bsf bso: an
$(BUILD) BUILDTYPE=$@ \
- PASSWDTYPE=pam \
- SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/etc/ssl/certs SSLKEYS=/etc/ssl/private GSSINCLUDE=/usr/include GSSLIB=/usr/lib LOCKPGM=/usr/sbin/mlock PAMLDFLAGS=-lpam"
$OpenBSD: patch-Makefile,v 1.10 2007/10/30 10:12:41 ajacoutot Exp $
--- Makefile.orig Wed Oct 24 23:55:15 2007
+++ Makefile Wed Oct 24 23:57:45 2007
@@ -333,7 +333,7 @@ bsf: an
bso: an
$(TOUCH) ip6
$(BUILD) BUILDTYPE=$@ IP=$(IP6) \
- SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/etc/ssl SSLKEYS=/etc/ssl/private GSSINCLUDE=/usr/include GSSLIB=/usr/lib LOCKPGM=/usr/sbin/mlock"
+ SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/etc/ssl SSLKEYS=/etc/ssl/private GSSINCLUDE=/usr/include/kerberosV GSSLIB=/usr/lib LOCKPGM=/usr/sbin/mlock"
cyg: an
$(BUILD) BUILDTYPE=cyg \
@@ -502,8 +501,8 @@ sslunix sslsco:
@@ -560,8 +560,8 @@ sslunix sslsco:
@echo ++ SSLTYPE=$(SSLTYPE).nopwd
@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@echo

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-src_osdep_unix_Makefile,v 1.7 2006/12/01 14:40:00 jakob Exp $
$OpenBSD: patch-src_osdep_unix_Makefile,v 1.8 2007/10/30 10:12:41 ajacoutot Exp $
--- src/osdep/unix/Makefile.orig Mon Oct 23 23:35:38 2006
+++ src/osdep/unix/Makefile Wed Nov 22 11:56:23 2006
--- src/osdep/unix/Makefile.orig Sun Jun 17 17:37:44 2007
+++ src/osdep/unix/Makefile Sat Oct 27 23:23:52 2007
@@ -42,7 +42,7 @@ IP=4
# -O3 seems to be safe, but empirical observation from our local expert
# indicates that in some (many?) cases -O3 code runs slower than -O2.
@ -11,3 +11,117 @@ $OpenBSD: patch-src_osdep_unix_Makefile,v 1.7 2006/12/01 14:40:00 jakob Exp $
# Try to have some consistency in GCC builds. We want optimization, but we
@@ -54,9 +54,9 @@ GCC4CFLAGS= $(GCCCFLAGS) -Wno-pointer-sign
# Extended flags needed for SSL. You may need to modify.
-SSLDIR=/usr/local/ssl
-SSLCERTS=$(SSLDIR)/certs
-SSLKEYS=$(SSLCERTS)
+SSLDIR=/usr
+SSLCERTS=/etc/ssl
+SSLKEYS=$(SSLCERTS)/private
SSLINCLUDE=$(SSLDIR)/include
SSLLIB=$(SSLDIR)/lib
@@ -142,6 +142,8 @@ DEFAULTAUTHENTICATORS=ext md5 pla log
DEFAULTDRIVERS=imap nntp pop3 mix mx mbx tenex mtx mh mmdf unix news phile
CHUNKSIZE=65536
+.SUFFIXES: .o .so
+
# Normally no need to change any of these
ARCHIVE=c-client.a
@@ -149,6 +151,7 @@ BINARIES=osdep.o mail.o misc.o newsrc.o smanager.o utf
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 mix.o
+SOBINARIES=$(BINARIES:.o=.so)
CFLAGS=-g
CAT=cat
@@ -157,6 +160,11 @@ MV=mv
RM=rm -rf
SH=sh
+.if ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "sparc"
+PICFLAG= -fPIC
+.else
+PICFLAG= -fpic
+.endif
# Primary build command
@@ -268,6 +276,7 @@ bso: # OpenBSD
SPOOLDIR=/var \
ACTIVEFILE=/usr/local/news/lib/active \
RSHPATH=/usr/bin/rsh \
+ LOCKPGM=$(PREFIX)/libexec/mlock \
BASECFLAGS="$(GCCCFLAGS)"
cvx: # Convex
@@ -840,23 +849,33 @@ vu2: # VAX Ultrix 2.3, etc.
# Build it!
+.if defined(NO_SHARED_LIBS) && ${NO_SHARED_LIBS:L} == "yes"
build: clean once $(ARCHIVE)
-
all: $(ARCHIVE)
+.else
+build: clean once $(ARCHIVE) $(SHLIB)
+all: $(ARCHIVE) $(SHLIB)
+.endif
$(ARCHIVE): $(BINARIES)
sh -c '$(RM) $(ARCHIVE) || true'
@$(CAT) ARCHIVE
@$(SH) ARCHIVE
+$(SHLIB): $(SOBINARIES)
+ $(CC) -shared $(PICFLAG) -o $(SHLIB) $(SOBINARIES)
+
+
.c.o:
`$(CAT) CCTYPE` -c `$(CAT) CFLAGS` $*.c
+.c.so:
+ `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` $(PICFLAG) -DPIC $(@:.so=.c) -o $@
# Cleanup
clean:
- sh -c '$(RM) auths.c crexcl.c ip_unix.c linkage.[ch] siglocal.c osdep*.[ch] *.o ARCHIVE *FLAGS *TYPE $(ARCHIVE) || true'
+ sh -c '$(RM) auths.c crexcl.c linkage.[ch] siglocal.c osdep*.[ch] *.o *.so ARCHIVE *FLAGS *TYPE $(ARCHIVE) $(SHLIB) || true'
# Dependencies
@@ -891,7 +910,7 @@ utf8aux.o: mail.h misc.h osdep.h utf8.h
# OS-dependent
-osdep.o:mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \
+OSDEPS= mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \
osdep.h env_unix.h tcp_unix.h \
osdep.c env_unix.c fs_unix.c ftl_unix.c nl_unix.c tcp_unix.c ip_unix.c\
auths.c crexcl.c flockcyg.c flocklnx.c flocksim.c fsync.c \
@@ -905,12 +924,12 @@ osdep.o:mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \
write.c sslstdio.c \
strerror.c strpbrk.c strstr.c strtok.c strtoul.c \
OSCFLAGS
- @echo Building OS-dependent module
- @echo If you get No such file error messages for files x509.h, ssl.h,
- @echo pem.h, buffer.h, bio.h, and crypto.h, that means that OpenSSL
- @echo is not installed on your system. Either install OpenSSL first
- @echo or build with command: make `$(CAT) OSTYPE` SSLTYPE=none
- `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` -c osdep.c
+
+osdep.o: $(OSDEPS)
+ `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` osdep.c
+
+osdep.so: $(OSDEPS)
+ `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` $(PICFLAG) -DPIC osdep.c -o $@
osdep.c: osdepbas.c osdepckp.c osdeplog.c osdepssl.c
$(CAT) osdepbas.c osdepckp.c osdeplog.c osdepssl.c > osdep.c

View File

@ -1,16 +1,16 @@
$OpenBSD: patch-src_osdep_unix_Makefile.gss,v 1.6 2006/12/01 14:40:00 jakob Exp $
$OpenBSD: patch-src_osdep_unix_Makefile.gss,v 1.7 2007/10/30 10:12:41 ajacoutot Exp $
--- src/osdep/unix/Makefile.gss.orig Thu Aug 31 03:32:16 2006
+++ src/osdep/unix/Makefile.gss Wed Nov 22 12:08:43 2006
@@ -29,11 +29,10 @@
--- src/osdep/unix/Makefile.gss.orig Thu Oct 25 00:11:46 2007
+++ src/osdep/unix/Makefile.gss Thu Oct 25 00:12:46 2007
@@ -29,11 +29,12 @@
GSSDIR=/usr/local
GSSINCLUDE=$(GSSDIR)/include
GSSLIB=$(GSSDIR)/lib
-GSSCFLAGS= -I$(GSSINCLUDE) -DGSS_C_NT_HOSTBASED_SERVICE=gss_nt_service_name
-GSSOLDLDFLAGS= -L$(GSSLIB) -lgssapi_krb5 -lkrb5 -lcrypto -lcom_err
-GSSNEWLDFLAGS= -L$(GSSLIB) -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err
-GSSCFLAGS= -I$(GSSINCLUDE) -DGSS_C_NT_HOSTBASED_SERVICE=gss_nt_service_name -DKRB5_DEPRECATED=1
+GSSCFLAGS= -I$(GSSINCLUDE) -DHEIMDAL
+GSSLDFLAGS= -L$(GSSLIB) -lkafs -lgssapi -lkrb5 -lasn1 -lcom_err -ldes -lcrypto
GSSOLDLDFLAGS= -L$(GSSLIB) -lgssapi_krb5 -lkrb5 -lcrypto -lcom_err
GSSNEWLDFLAGS= -L$(GSSLIB) -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err
gss: # GSSAPI Kerberos V flags
echo $(GSSCFLAGS) >> OSCFLAGS

View File

@ -1,8 +1,8 @@
$OpenBSD: patch-src_osdep_unix_env_unix.c,v 1.7 2006/12/01 14:40:00 jakob Exp $
$OpenBSD: patch-src_osdep_unix_env_unix.c,v 1.8 2007/10/30 10:12:41 ajacoutot Exp $
--- src/osdep/unix/env_unix.c.orig Fri Sep 15 19:00:55 2006
+++ src/osdep/unix/env_unix.c Wed Nov 22 11:50:47 2006
@@ -888,15 +888,12 @@ char *myhomedir ()
--- src/osdep/unix/env_unix.c.orig Tue May 29 22:29:52 2007
+++ src/osdep/unix/env_unix.c Thu Oct 25 00:13:05 2007
@@ -935,15 +935,12 @@ char *myhomedir ()
static char *mymailboxdir ()
{
char *home = myhomedir ();

View File

@ -0,0 +1,3 @@
c-client is a common API for accessing mailboxes. It is used internally by
the popular PINE mail reader as well as the University of Washington's
IMAP server.

View File

@ -0,0 +1,2 @@
@comment $OpenBSD: PFRAG.shared-c-client,v 1.1 2007/10/30 10:12:41 ajacoutot Exp $
@lib lib/libc-client.so.${LIBc-client_VERSION}

View File

@ -0,0 +1,34 @@
@comment $OpenBSD: PLIST-c-client,v 1.1 2007/10/30 10:12:41 ajacoutot Exp $
@pkgpath mail/c-client
%%SHARED%%
include/c-client/
include/c-client/c-client.h
include/c-client/dummy.h
include/c-client/env.h
include/c-client/env_unix.h
include/c-client/fdstring.h
include/c-client/flockcyg.h
include/c-client/flocksim.h
include/c-client/flstring.h
include/c-client/fs.h
include/c-client/ftl.h
include/c-client/imap4r1.h
include/c-client/linkage.c
include/c-client/linkage.h
include/c-client/mail.h
include/c-client/misc.h
include/c-client/netmsg.h
include/c-client/newsrc.h
include/c-client/nl.h
include/c-client/nntp.h
include/c-client/osdep.h
include/c-client/pseudo.h
include/c-client/rfc822.h
include/c-client/smtp.h
include/c-client/sslio.h
include/c-client/tcp.h
include/c-client/tcp_unix.h
include/c-client/unix.h
include/c-client/utf8.h
include/c-client/utf8aux.h
lib/libc-client.a

View File

@ -1,24 +1,77 @@
@comment $OpenBSD: PLIST-server,v 1.1 2006/12/01 14:40:00 jakob Exp $
@pkgpath ${BASE_PKGPATH}
@comment $OpenBSD: PLIST-server,v 1.2 2007/10/30 10:12:41 ajacoutot Exp $
@conflict courier-imap-*
@conflict courier-pop3-*
@pkgpath ${BASE_PKGPATH}
bin/dmail
bin/tmail
libexec/imapd
libexec/ipop2d
libexec/ipop3d
libexec/mlock
@man man/man1/dmail.1
@man man/man1/tmail.1
@man man/man8/imapd.8
@man man/man8/ipopd.8
share/doc/imap-uw/
share/doc/imap-uw/BUILD
share/doc/imap-uw/CONFIG
share/doc/imap-uw/FAQ.html
share/doc/imap-uw/FAQ.txt
share/doc/imap-uw/IPv6.txt
share/doc/imap-uw/RELNOTES
share/doc/imap-uw/SSLBUILD
share/doc/imap-uw/Y2K
share/doc/imap-uw/bugs.txt
share/doc/imap-uw/calendar.txt
share/doc/imap-uw/commndmt.txt
share/doc/imap-uw/draft/
share/doc/imap-uw/draft/README
share/doc/imap-uw/draft/i18n.txt
share/doc/imap-uw/draft/sort.txt
share/doc/imap-uw/drivers.txt
share/doc/imap-uw/formats.txt
share/doc/imap-uw/imaprc.txt
share/doc/imap-uw/internal.txt
share/doc/imap-uw/locking.txt
share/doc/imap-uw/md5.txt
share/doc/imap-uw/mixfmt.txt
share/doc/imap-uw/naming.txt
share/doc/imap-uw/rfc/
share/doc/imap-uw/rfc/README
share/doc/imap-uw/rfc/rfc1732.txt
share/doc/imap-uw/rfc/rfc1733.txt
share/doc/imap-uw/rfc/rfc2061.txt
share/doc/imap-uw/rfc/rfc2062.txt
share/doc/imap-uw/rfc/rfc2087.txt
share/doc/imap-uw/rfc/rfc2088.txt
share/doc/imap-uw/rfc/rfc2177.txt
share/doc/imap-uw/rfc/rfc2180.txt
share/doc/imap-uw/rfc/rfc2192.txt
share/doc/imap-uw/rfc/rfc2193.txt
share/doc/imap-uw/rfc/rfc2195.txt
share/doc/imap-uw/rfc/rfc2221.txt
share/doc/imap-uw/rfc/rfc2342.txt
share/doc/imap-uw/rfc/rfc2683.txt
share/doc/imap-uw/rfc/rfc2971.txt
share/doc/imap-uw/rfc/rfc3348.txt
share/doc/imap-uw/rfc/rfc3501.txt
share/doc/imap-uw/rfc/rfc3502.txt
share/doc/imap-uw/rfc/rfc3503.txt
share/doc/imap-uw/rfc/rfc3516.txt
share/doc/imap-uw/rfc/rfc3656.txt
share/doc/imap-uw/rfc/rfc3691.txt
share/doc/imap-uw/rfc/rfc4234.txt
share/doc/imap-uw/rfc/rfc4314.txt
share/doc/imap-uw/rfc/rfc4315.txt
share/doc/imap-uw/rfc/rfc4422.txt
share/doc/imap-uw/rfc/rfc4466.txt
share/doc/imap-uw/rfc/rfc4467.txt
share/doc/imap-uw/rfc/rfc4468.txt
share/doc/imap-uw/rfc/rfc4469.txt
share/doc/imap-uw/rfc/rfc4505.txt
share/doc/imap-uw/rfc/rfc4549.txt
share/doc/imap-uw/rfc/rfc4551.txt
share/doc/imap-uw/rfc/rfc4616.txt
share/doc/imap-uw/rfc/rfc4731.txt
share/doc/imap-uw/rfc/rfc4752.txt
share/doc/imap-uw/rfc/rfc4790.txt

View File

@ -1,9 +0,0 @@
$Id: SECURITY,v 1.1 2000/05/03 07:44:56 jakob Exp $
This port is not safe to use on a system which does not provide shell
access to users who can retrieve mail via IMAP. imapd contains buffer
overflows which a user can exploit after they have logged into imap to get
access to their account on the machine. If your imap users have shell
access anyway, this is not a significant vulnerability. There is also a
vulnerability wherein local users can prevent arbitrary POP2/3 mailboxes
from being opened, and force IMAP mailboxes to only open read-only.