aboutsummaryrefslogtreecommitdiffstats
path: root/mail/imap-uw
diff options
context:
space:
mode:
authordwcjr <dwcjr@FreeBSD.org>2001-06-25 10:40:49 +0800
committerdwcjr <dwcjr@FreeBSD.org>2001-06-25 10:40:49 +0800
commit3d4ae28f0716f6e6cce8776f0593bf5d693b9451 (patch)
tree61e3c116719b8be0ff09bd2f0dd7c2b8204ff3f6 /mail/imap-uw
parentb2a037605f1c5cabbb29715f3ded56696c0da86b (diff)
downloadfreebsd-ports-graphics-3d4ae28f0716f6e6cce8776f0593bf5d693b9451.tar.gz
freebsd-ports-graphics-3d4ae28f0716f6e6cce8776f0593bf5d693b9451.tar.zst
freebsd-ports-graphics-3d4ae28f0716f6e6cce8776f0593bf5d693b9451.zip
Update imap-uw and cclient to 0106191041
Add SSL support to both Add pkg-req.rev to detect version Add pkg-req.ssl to keep track of ssl versions PR: 28289 Submitted by: maintainer
Diffstat (limited to 'mail/imap-uw')
-rw-r--r--mail/imap-uw/Makefile51
-rw-r--r--mail/imap-uw/distinfo2
-rw-r--r--mail/imap-uw/files/patch-ac20
-rw-r--r--mail/imap-uw/files/patch-ai152
-rw-r--r--mail/imap-uw/pkg-install2
-rw-r--r--mail/imap-uw/pkg-plist12
-rw-r--r--mail/imap-uw/pkg-req.rev23
-rw-r--r--mail/imap-uw/pkg-req.ssl27
8 files changed, 203 insertions, 86 deletions
diff --git a/mail/imap-uw/Makefile b/mail/imap-uw/Makefile
index b7802ae69eb..cbff09ca4c7 100644
--- a/mail/imap-uw/Makefile
+++ b/mail/imap-uw/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= imap
-PORTVERSION= 0104241750
+PORTVERSION= 0106191041
CATEGORIES= mail
MASTER_SITES= ftp://ftp.cac.washington.edu/imap/%SUBDIR%/ \
ftp://ftp.nuug.no/pub/anders/distfiles/%SUBDIR%/ \
@@ -38,15 +38,55 @@ MAKE_ARGS+= SSLTYPE=unix
USE_OPENSSL= yes
.endif
+# RFC 1730 (IMAP4 as opposed to IMAP4rev1) support
+.if defined(WITH_RFC1730)
+MAKE_ARGS+= RFC1730="-DRFC1730"
+.endif
+# Define this to get somewhat better interoperability with Netscape.
+.if defined(WITH_NETSCAPE_BRAIN_DAMAGE)
+MAKE_ARGS+= WITH_NETSCAPE_BRAIN_DAMAGE=yes
+.endif
+# Define this to get somewhat better interoperability with Microsoft
+# Outlook and Outlook Express.
+.if defined(WITH_MICROSOFT_BRAIN_DAMAGE)
+MAKE_ARGS+= MSBD="-DMICROSOFT_BRAIN_DAMAGE"
+.endif
+# See src/imapd/Makefile for more information about these three options.
+
+SOURCEDIRS_IMAPUTILS= chkmail dmail icat ifrom imapcopy imapxfer mbxcopy \
+ mbxcreat mbxcvt tmail
+.if defined(WITH_ALL_IMAPUTILS)
+MAN1= chkmail.1 dmail.1 icat.1 ifrom.1 imapcopy.1 imapxfer.1 mbxcopy.1 \
+ mbxcreat.1 mbxcvt.1 tmail.1
+PLIST_SUB+= IMAPUTILS=''
+.else
+PLIST_SUB+= IMAPUTILS='@comment '
+.endif
+
.include <bsd.port.pre.mk>
pre-extract:
+ @${SH} ${PKGREQ}.rev ${LOCALBASE}/include/c-client/portrevision.h ${PORTVERSION}
.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
@${SH} ${PKGINSTALL} foo PRE-INSTALL || ${FALSE}
.endif
+pre-build:
+.if defined(WITH_SSL)
+ @${SH} ${PKGREQ}.ssl ${LOCALBASE}/include/c-client/portrevision.h yes
+.else
+ @${SH} ${PKGREQ}.ssl ${LOCALBASE}/include/c-client/portrevision.h no
+.endif
+
post-build:
@(cd ${WRKDIR}/mlock; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} all)
+.if defined(WITH_ALL_IMAPUTILS)
+.for d in ${SOURCEDIRS_IMAPUTILS}
+ @${ECHO} "Building ${d}."
+ (cd ${WRKDIR}/${d}; ${CC} ${CFLAGS} -I${LOCALBASE}/include/c-client \
+ -o ${d} ${d}.c -L${LOCALBASE}/lib -lc-client4 -lssl -lcrypto)
+.endfor
+.endif
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/imapd/imapd ${PREFIX}/libexec
@@ -59,6 +99,15 @@ do-install:
${WRKSRC}/src/imapd/imapd.8c ${PREFIX}/man/man8/imapd.8
${INSTALL_MAN} \
${WRKSRC}/src/ipopd/ipopd.8c ${PREFIX}/man/man8/ipopd.8
+.if defined(WITH_ALL_IMAPUTILS)
+.for d in ${SOURCEDIRS_IMAPUTILS}
+ @${ECHO} "Installing ${d}."
+ ${INSTALL_PROGRAM} ${WRKDIR}/${d}/${d} ${PREFIX}/bin
+ ${INSTALL_MAN} ${WRKDIR}/${d}/${d}.1 ${PREFIX}/man/man1
+.endfor
+ (cd ${PREFIX}/bin; ${LN} -s imapcopy imapmove)
+ (cd ${PREFIX}/bin; ${LN} -s mbxcopy mbxmove)
+.endif
post-install:
@${CAT} ${PKGMESSAGE}
diff --git a/mail/imap-uw/distinfo b/mail/imap-uw/distinfo
index 9eacc3374ac..7d4caa97ec3 100644
--- a/mail/imap-uw/distinfo
+++ b/mail/imap-uw/distinfo
@@ -1,2 +1,2 @@
-MD5 (imap-2001.BETA.SNAP-0104241750.tar.Z) = b28ed6662344d7552078f53fbc20362b
+MD5 (imap-2001.BETA.SNAP-0106191041.tar.Z) = 119117c9ba437b6de64c68326fe5ddc8
MD5 (imap-utils.tar.Z) = a6453029f201b32e9ed761e662c47b0f
diff --git a/mail/imap-uw/files/patch-ac b/mail/imap-uw/files/patch-ac
index 32d2ca1e16f..50817cb5f0f 100644
--- a/mail/imap-uw/files/patch-ac
+++ b/mail/imap-uw/files/patch-ac
@@ -1,5 +1,5 @@
---- src/imapd/Makefile.orig Tue Apr 24 01:23:43 2001
-+++ src/imapd/Makefile Tue Apr 24 01:30:06 2001
+--- src/imapd/Makefile.orig Thu May 10 07:31:46 2001
++++ src/imapd/Makefile Wed Jun 20 02:29:42 2001
@@ -18,10 +18,10 @@
# CPYRIGHT, included with this Distribution.
@@ -13,14 +13,25 @@
SHELL= /bin/sh
-@@ -49,22 +49,24 @@
+@@ -37,7 +37,9 @@
+ # NULs in the message text are technically a violation of both the message
+ # format and the IMAP specification, they can happen. Fortunately, most
+ # IMAP clients don't care. Netscape hangs.
+-#NSBD= -DNETSCAPE_BRAIN_DAMAGE=\"http://www.washington.edu/pine\"
++.if defined(WITH_NETSCAPE_BRAIN_DAMAGE)
++NSBD= -DNETSCAPE_BRAIN_DAMAGE=\"http://www.washington.edu/pine\"
++.endif
+
+
+ # Un-comment this to get somewhat better interoperability with Microsoft
+@@ -52,22 +54,25 @@
# Get local definitions from c-client directory
C = ../c-client
-CCLIENTLIB = $C/c-client.a
+#CCLIENTLIB = $C/c-client.a
CC = `cat $C/CCTYPE`
--CFLAGS = -I$C `cat $C/CFLAGS` $(NSBD) $(MSBD) -DANOFILE=\"$(ANO)\" \
+-CFLAGS = -I$C `cat $C/CFLAGS` $(RFC1730) $(NSBD) $(MSBD) -DANOFILE=\"$(ANO)\" \
+.if defined(WITH_DRAC)
+CFLAGS = `cat $C/CFLAGS` -DANOFILE=\"$(ANO)\" -DETC_DIR=\"$(PREFIX)/etc\" \
+ -DALERTFILE=\"$(ALERT)\" -DUSERALERTFILE=\"$(USERALERT)\" -DDRAC_AUTH \
@@ -33,6 +44,7 @@
-LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS`
+LDFLAGS = $(EXTRALDFLAGS) `cat $C/LDFLAGS`
+.endif
++CFLAGS+= $(RFC1730) $(NSBD) $(MSBD)
all: imapd
diff --git a/mail/imap-uw/files/patch-ai b/mail/imap-uw/files/patch-ai
index 86c043173b1..2bd82c7ea07 100644
--- a/mail/imap-uw/files/patch-ai
+++ b/mail/imap-uw/files/patch-ai
@@ -1,79 +1,73 @@
-*** src/imapd/imapd.c.orig Mon Apr 23 16:45:41 2001
---- src/imapd/imapd.c Tue Apr 24 22:14:38 2001
-***************
-*** 29,34 ****
---- 29,39 ----
- #include "c-client.h"
- #include <sys/stat.h>
-
-+ #ifdef DRAC_AUTH
-+ #include <netinet/in.h>
-+ #include <arpa/inet.h>
-+ #include <stdlib.h>
-+ #endif /* DRAC_AUTH */
-
- #define CRLF PSOUT ("\015\012") /* primary output terpri */
-
-***************
-*** 173,178 ****
---- 178,189 ----
-
- /* Global storage */
-
-+ #ifdef DRAC_AUTH
-+ #define DRACTIMEOUT 10*60 /* check every 10 minutes */
-+ time_t lastdrac = 0; /* time of last drac check */
-+ extern char *getenv ();
-+ #endif /* DRAC_AUTH */
-+
- char *version = "2001.303"; /* version number of this server */
- time_t alerttime = 0; /* time of last alert */
- time_t sysalerttime = 0; /* time of last system alert */
-***************
-*** 1167,1172 ****
---- 1178,1222 ----
- lasterror ());
- return;
- }
-+
-+ #ifdef DRAC_AUTH
-+ if (time (0) > lastdrac + DRACTIMEOUT)
-+ {
-+ FILE *dracconf;
-+ char host[100];
-+ char *drachost;
-+ char *err;
-+ char *p;
-+
-+ if ( (dracconf = fopen(ETC_DIR "/dracd.host", "r")) == NULL)
-+ {
-+ syslog (LOG_INFO, "dracd: error opening %s/dracd.host config file",ETC_DIR);
-+ exit(1);
-+ }
-+
-+ fgets(host, 100, dracconf);
-+ p = strchr(host, '\n');
-+ if(p != NULL)
-+ *p = '\0';
-+ fclose(dracconf);
-+
-+ if( drachost = (host) )
-+ {
-+ struct sockaddr_in sin;
-+ int sinlen = sizeof (struct sockaddr_in);
-+ char *client = getpeername (0,(struct sockaddr *) &sin,(void *) &sinlen) ?
-+ "UNKNOWN" : inet_ntoa (sin.sin_addr);
-+
-+ lastdrac = time(0);
-+
-+ if (dracauth(drachost, inet_addr(client), &err) != 0)
-+ syslog (LOG_INFO, err);
-+ else
-+ syslog (LOG_INFO, "dracd: authorized ip %s", client);
-+ }
-+ }
-+ #endif /* DRAC_AUTH */
-+
- /* change in number of messages? */
- if (existsquelled || (nmsgs != stream->nmsgs)) {
- PSOUT ("* ");
+--- src/imapd/imapd.c.orig Wed Jun 20 01:57:16 2001
++++ src/imapd/imapd.c Wed Jun 20 02:01:00 2001
+@@ -29,6 +29,11 @@
+ #include "c-client.h"
+ #include <sys/stat.h>
+
++#ifdef DRAC_AUTH
++#include <netinet/in.h>
++#include <arpa/inet.h>
++#include <stdlib.h>
++#endif /* DRAC_AUTH */
+
+ #define CRLF PSOUT ("\015\012") /* primary output terpri */
+
+@@ -173,6 +178,12 @@
+
+ /* Global storage */
+
++#ifdef DRAC_AUTH
++#define DRACTIMEOUT 10*60 /* check every 10 minutes */
++time_t lastdrac = 0; /* time of last drac check */
++extern char *getenv ();
++#endif /* DRAC_AUTH */
++
+ char *version = "2001.307"; /* version number of this server */
+ time_t alerttime = 0; /* time of last alert */
+ time_t sysalerttime = 0; /* time of last system alert */
+@@ -1169,6 +1180,45 @@
+ lasterror ());
+ return;
+ }
++
++#ifdef DRAC_AUTH
++ if (time (0) > lastdrac + DRACTIMEOUT)
++ {
++ FILE *dracconf;
++ char host[100];
++ char *drachost;
++ char *err;
++ char *p;
++
++ if ( (dracconf = fopen(ETC_DIR "/dracd.host", "r")) == NULL)
++ {
++ syslog (LOG_INFO, "dracd: error opening %s/dracd.host config file",ETC_DIR);
++ exit(1);
++ }
++
++ fgets(host, 100, dracconf);
++ p = strchr(host, '\n');
++ if(p != NULL)
++ *p = '\0';
++ fclose(dracconf);
++
++ if( drachost = (host) )
++ {
++ struct sockaddr_in sin;
++ int sinlen = sizeof (struct sockaddr_in);
++ char *client = getpeername (0,(struct sockaddr *) &sin,(void *) &sinlen) ?
++ "UNKNOWN" : inet_ntoa (sin.sin_addr);
++
++ lastdrac = time(0);
++
++ if (dracauth(drachost, inet_addr(client), &err) != 0)
++ syslog (LOG_INFO, err);
++ else
++ syslog (LOG_INFO, "dracd: authorized ip %s", client);
++ }
++ }
++#endif /* DRAC_AUTH */
++
+ /* change in number of messages? */
+ if (existsquelled || (nmsgs != stream->nmsgs)) {
+ PSOUT ("* ");
diff --git a/mail/imap-uw/pkg-install b/mail/imap-uw/pkg-install
index e3983e766e5..c7541a4b194 100644
--- a/mail/imap-uw/pkg-install
+++ b/mail/imap-uw/pkg-install
@@ -9,7 +9,7 @@ case $2 in
POST-INSTALL)
;;
PRE-INSTALL)
- if dialog --yesno "This port is not safe to use on a system which does not\nprovide shell access to users who can retrieve mail via IMAP.\nimapd contains buffer overflows which a user can exploit\nafter they have logged into imap to get access to their\naccount on the machine. If your imap users have shell access\nanyway, this is not a significant vulnerability.\n\nThere is also a vulnerability wherein local users can prevent\narbitrary POP2/3 mailboxes from being opened, and force IMAP\nmailboxes to only open read-only.\n\nDo you wish to proceed with the build?" 16 65 < ${TTY} >${TTY} 2>&1; then
+ if dialog --yesno "This port has been proven exploitable at several occasions (read up\non CERT advisories), leaving systems subject to remote root access.\nBefore installing this package, please consider:\n\na) Whether you really want to use this software. The integrity of\nyour system may be at risk.\n\nb) Using TCP Wrappers to protect your UW imap/pop daemons from being\npublicly available. Adding this to /etc/hosts.allow will make your\nimap and pop3 daemons accessible only from 192.168.0.0/24:\n\nimapd : 192.168.0.0/24 : allow\nimapd : ALL : deny\nipop3d : 192.168.0.0/24 : allow\nipop3d : ALL : deny\n\nFor more information about the hosts.allow file, read\nhosts_access(5). Please test that this setup works as expected.\n\nDo you wish to proceed with the build?" 24 72 < ${TTY} >${TTY} 2>&1; then
exit 0
else
exit 1
diff --git a/mail/imap-uw/pkg-plist b/mail/imap-uw/pkg-plist
index f9a47a833f2..9c9aca5085a 100644
--- a/mail/imap-uw/pkg-plist
+++ b/mail/imap-uw/pkg-plist
@@ -3,3 +3,15 @@ libexec/imapd
libexec/ipop2d
libexec/ipop3d
libexec/mlock
+%%IMAPUTILS%%bin/chkmail
+%%IMAPUTILS%%bin/dmail
+%%IMAPUTILS%%bin/icat
+%%IMAPUTILS%%bin/ifrom
+%%IMAPUTILS%%bin/imapcopy
+%%IMAPUTILS%%bin/imapmove
+%%IMAPUTILS%%bin/imapxfer
+%%IMAPUTILS%%bin/mbxcopy
+%%IMAPUTILS%%bin/mbxmove
+%%IMAPUTILS%%bin/mbxcreat
+%%IMAPUTILS%%bin/mbxcvt
+%%IMAPUTILS%%bin/tmail
diff --git a/mail/imap-uw/pkg-req.rev b/mail/imap-uw/pkg-req.rev
new file mode 100644
index 00000000000..33ce1bc506f
--- /dev/null
+++ b/mail/imap-uw/pkg-req.rev
@@ -0,0 +1,23 @@
+#! /bin/sh
+# anders@fix.no, 2001-06-19
+
+if [ ! -f "$1" ]
+then
+ echo "Your installation of the cclient port is outdated. Please delete it before"
+ echo "continuing."
+ exit 1
+fi
+
+portver=`grep "^#define CCLIENT_PORTVERSION" $1 | awk '{print $3}' \
+| sed s/\"//g`
+
+if [ "$portver" = "$2" ]
+then
+ echo "Your imap-uw port matches the version of your cclient port. Fine."
+ exit 0
+else
+ echo "Your cclient port (PORTVERSION $portver) does not match the version of imap-uw"
+ echo "(PORTVERSION $2) you are trying to install. Please delete your"
+ echo "installation of the cclient port before continuing."
+ exit 1
+fi
diff --git a/mail/imap-uw/pkg-req.ssl b/mail/imap-uw/pkg-req.ssl
new file mode 100644
index 00000000000..9290be0cd4c
--- /dev/null
+++ b/mail/imap-uw/pkg-req.ssl
@@ -0,0 +1,27 @@
+#! /bin/sh
+# anders@fix.no, 2001-06-19
+
+sslenabled=`grep "^#define CCLIENT_SSLENABLED" $1 | awk '{print $3}' \
+| sed s/\"//g`
+
+case $2 in
+yes)
+ if [ "$sslenabled" = "yes" ]
+ then
+ echo "SSL check passed. We want SSL support, and cclient has it. Good."
+ exit 0
+ else
+ echo "SSL check failed. Wa want SSL support, but cclient doesn't have it."
+ echo "Please recompile and reinstall the cclient port with WITH_SSL=yes set."
+ exit 1
+ fi
+ ;;
+*)
+ if [ "$sslenabled" = "yes" ]
+ then
+ echo "You did not want SSL (by not defining WANT_SSL). Funny thing is, your cclient"
+ echo "port has SSL support installed."
+ exit 0
+ fi
+ ;;
+esac