aboutsummaryrefslogtreecommitdiffstats
path: root/mail/imap-uw
diff options
context:
space:
mode:
authorjeh <jeh@FreeBSD.org>2001-03-23 11:04:16 +0800
committerjeh <jeh@FreeBSD.org>2001-03-23 11:04:16 +0800
commit494d545fd4cd05516b4deb5420c3beb2c550a4c3 (patch)
tree5fe48fe19348d3d8420b423373d49aa128354859 /mail/imap-uw
parenta523e35a07cb28d5a74a481d854c1c8bafdb345a (diff)
downloadfreebsd-ports-gnome-494d545fd4cd05516b4deb5420c3beb2c550a4c3.tar.gz
freebsd-ports-gnome-494d545fd4cd05516b4deb5420c3beb2c550a4c3.tar.zst
freebsd-ports-gnome-494d545fd4cd05516b4deb5420c3beb2c550a4c3.zip
* Update the imap-uw port to use PAM again, as it used to. We do have imap by
default in /etc/pam.conf, so it must be better to compile imap-uw with PAM authentication too no? * Changed the PAM service name for the POP3 daemon from pop to pop3 as that is what we have in our default pam.conf. * Update the port with optional DRAC support. Approved by Maintainer PR: 24135 Submitted by: Anders Nordby <anders@fix.no>
Diffstat (limited to 'mail/imap-uw')
-rw-r--r--mail/imap-uw/Makefile13
-rw-r--r--mail/imap-uw/files/patch-ab22
-rw-r--r--mail/imap-uw/files/patch-ac6
-rw-r--r--mail/imap-uw/files/patch-ad13
-rw-r--r--mail/imap-uw/files/patch-af11
-rw-r--r--mail/imap-uw/files/patch-ah83
-rw-r--r--mail/imap-uw/files/patch-ai99
7 files changed, 240 insertions, 7 deletions
diff --git a/mail/imap-uw/Makefile b/mail/imap-uw/Makefile
index d4380e1bb154..8135a1dc42eb 100644
--- a/mail/imap-uw/Makefile
+++ b/mail/imap-uw/Makefile
@@ -20,6 +20,9 @@ DISTFILES= ${DISTNAME}.tar.Z \
MAINTAINER= petef@databits.net
LIB_DEPENDS= c-client4.8:${PORTSDIR}/mail/cclient
+.if defined(WITH_DRAC)
+BUILD_DEPENDS= ${LOCALBASE}/lib/libdrac.a:${PORTSDIR}/mail/drac
+.endif
MAN8= ipopd.8 imapd.8
ALL_TARGET= bsf
@@ -46,6 +49,16 @@ do-install:
${INSTALL_MAN} \
${WRKSRC}/src/ipopd/ipopd.8c ${PREFIX}/man/man8/ipopd.8
+.if defined(WITH_DRAC)
+post-install:
+ @${ECHO} "================================================================================"
+ @${ECHO} "To have DRAC working, you must create ${PREFIX}/etc/dracd.host, containing"
+ @${ECHO} "the hostname of the DRAC server:"
+ @${ECHO}
+ @${ECHO} "localhost"
+ @${ECHO} "================================================================================"
+.endif
+
post-install:
@${CAT} ${PKGMESSAGE}
diff --git a/mail/imap-uw/files/patch-ab b/mail/imap-uw/files/patch-ab
index 93c5536d17be..350c51374d2d 100644
--- a/mail/imap-uw/files/patch-ab
+++ b/mail/imap-uw/files/patch-ab
@@ -1,5 +1,23 @@
---- src/osdep/unix/Makefile.orig Tue Oct 31 13:55:01 2000
-+++ src/osdep/unix/Makefile Sun Dec 17 23:39:05 2000
+--- src/osdep/unix/Makefile.old Tue Oct 31 22:55:01 2000
++++ src/osdep/unix/Makefile Sun Dec 31 19:11:17 2000
+@@ -23,7 +23,7 @@
+ EXTRAAUTHENTICATORS=
+ SPECIALAUTHENTICATORS=
+ EXTRADRIVERS=mbox
+-PASSWDTYPE=std
++PASSWDTYPE=pam
+
+
+ # Extended flags needed for non-standard passwd types. You may need to modify.
+@@ -37,7 +37,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
+
+
+ # Build parameters normally set by the individual port
@@ -74,7 +74,7 @@
# Commands possibly overriden by the individual port
diff --git a/mail/imap-uw/files/patch-ac b/mail/imap-uw/files/patch-ac
index 21998e76287e..283763ab2dfe 100644
--- a/mail/imap-uw/files/patch-ac
+++ b/mail/imap-uw/files/patch-ac
@@ -20,11 +20,17 @@
+#CCLIENTLIB = $C/c-client.a
CC = `cat $C/CCTYPE`
-CFLAGS = -I$C `cat $C/CFLAGS` $(EXTRACFLAGS) -DANOFILE=\"$(ANO)\" \
++.if defined(WITH_DRAC)
++CFLAGS = `cat $C/CFLAGS` -DANOFILE=\"$(ANO)\" -DETC_DIR=\"$(PREFIX)/etc\" \
++ -DALERTFILE=\"$(ALERT)\" -DUSERALERTFILE=\"$(USERALERT)\" -DDRAC_AUTH
++LDFLAGS = $(EXTRALDFLAGS) `cat $C/LDFLAGS` -ldrac
++.else
+CFLAGS = `cat $C/CFLAGS` -DANOFILE=\"$(ANO)\" \
-DALERTFILE=\"$(ALERT)\" -DUSERALERTFILE=\"$(USERALERT)\"
-LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS`
+
+LDFLAGS = $(EXTRALDFLAGS) `cat $C/LDFLAGS`
++.endif
all: imapd
diff --git a/mail/imap-uw/files/patch-ad b/mail/imap-uw/files/patch-ad
index 8e996395b886..4e17c2071d64 100644
--- a/mail/imap-uw/files/patch-ad
+++ b/mail/imap-uw/files/patch-ad
@@ -1,5 +1,5 @@
---- Makefile.orig Thu Nov 2 13:04:11 2000
-+++ Makefile Mon Dec 18 01:13:25 2000
+--- Makefile.old Thu Nov 2 22:04:11 2000
++++ Makefile Sun Dec 31 19:06:58 2000
@@ -43,6 +43,7 @@
# art AIX 2.2.1 for RT
# asv Altos SVR4
@@ -8,6 +8,15 @@
# bs3 BSD/i386 3.0 and higher
# bsd generic BSD 4.3 (as in ancient 1980s version)
# bsf FreeBSD
+@@ -153,7 +154,7 @@
+ # std system standard (typically passwd file), determined by port
+ # two try alternative (defined by CHECKPWALT), then std
+
+-PASSWDTYPE=std
++PASSWDTYPE=pam
+
+
+ # The following extra compilation flags are defined. None of these flags are
@@ -272,12 +273,12 @@
# gradually-increasing intervals, starting at 2800-2900, and becoming
# permanent at 48,300.
diff --git a/mail/imap-uw/files/patch-af b/mail/imap-uw/files/patch-af
index 0520676e2461..57e198d8d29d 100644
--- a/mail/imap-uw/files/patch-af
+++ b/mail/imap-uw/files/patch-af
@@ -1,6 +1,6 @@
---- src/ipopd/Makefile.orig Tue Apr 14 15:41:55 1998
-+++ src/ipopd/Makefile Fri Jul 7 00:27:30 2000
-@@ -32,29 +32,22 @@
+--- src/ipopd/Makefile.old Wed Oct 25 01:55:07 2000
++++ src/ipopd/Makefile Sun Dec 31 18:23:16 2000
+@@ -19,29 +19,27 @@
C = ../c-client
@@ -13,8 +13,13 @@
CC = `cat $C/CCTYPE`
-CFLAGS = -I$C `cat $C/CFLAGS`
-LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS`
++.if defined(WITH_DRAC)
++CFLAGS = `cat $C/CFLAGS` -DDRAC_AUTH -DETC_DIR=\"$(PREFIX)/etc\"
++LDFLAGS = `cat $C/LDFLAGS` -ldrac
++.else
+CFLAGS = `cat $C/CFLAGS`
+LDFLAGS = `cat $C/LDFLAGS`
++.endif
ipopd: ipop2d ipop3d
diff --git a/mail/imap-uw/files/patch-ah b/mail/imap-uw/files/patch-ah
new file mode 100644
index 000000000000..87f47a8dcfa9
--- /dev/null
+++ b/mail/imap-uw/files/patch-ah
@@ -0,0 +1,83 @@
+--- src/ipopd/ipop3d.c.old Wed Oct 25 01:15:46 2000
++++ src/ipopd/ipop3d.c Sun Jan 7 21:40:25 2001
+@@ -35,6 +35,11 @@
+ #include <time.h>
+ #include "c-client.h"
+
++#ifdef DRAC_AUTH
++#include <netinet/in.h>
++#include <arpa/inet.h>
++#include <stdlib.h>
++#endif /* DRAC_AUTH */
+
+ /* Autologout timer */
+ #define KODTIMEOUT 60*5
+@@ -61,6 +66,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 = "2000.69"; /* server version */
+ short state = AUTHORIZATION; /* server state */
+ short critical = NIL; /* non-zero if in critical code */
+@@ -104,7 +115,7 @@
+ #include "linkage.c"
+ /* initialize server */
+ server_init ((s = strrchr (argv[0],'/')) ? s + 1 : argv[0],
+- "pop3","pop3s","pop",clkint,kodint,hupint,trmint);
++ "pop3","pop3s","pop3",clkint,kodint,hupint,trmint);
+ challenge[0] = '\0'; /* find the CRAM-MD5 authenticator */
+ if (i = mail_lookup_auth_name ("CRAM-MD5",NIL)) {
+ AUTHENTICATOR *a = mail_lookup_auth (i);
+@@ -692,6 +703,46 @@
+ }
+ sprintf (tmp,"+OK Mailbox open, %lu messages\015\012",nmsgs);
+ PSOUT (tmp);
++ {
++ #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 /etc/mail/dracd.host config file");
++ 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 */
++ }
++
+ return TRANSACTION;
+ }
+ else sayonara = "-ERR Can't get lock. Mailbox in use\015\012";
diff --git a/mail/imap-uw/files/patch-ai b/mail/imap-uw/files/patch-ai
new file mode 100644
index 000000000000..b0c6763648d6
--- /dev/null
+++ b/mail/imap-uw/files/patch-ai
@@ -0,0 +1,99 @@
+--- src/imapd/imapd.c.old Sat Nov 18 05:16:29 2000
++++ src/imapd/imapd.c Sun Dec 31 18:53:25 2000
+@@ -17,7 +17,7 @@
+ * The full text of our legal notices is contained in the file called
+ * CPYRIGHT, included with this Distribution.
+ */
+-
++
+ /* Primary I/O calls */
+
+ #define PBIN getchar /* primary byte input */
+@@ -43,6 +43,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 */
+
+ /* Timeouts and timers */
+
+@@ -66,7 +71,7 @@
+ #define SELECT 1
+ #define OPEN 2
+ #define LOGOUT 3
+-
++
+ /* Body text fetching */
+
+ typedef struct text_args {
+@@ -98,7 +103,7 @@
+ char *date; /* current date */
+ STRING *message; /* strintstruct of message */
+ } MSGDATA;
+-
++
+ /* Function prototypes */
+
+ int main (int argc,char *argv[]);
+@@ -181,6 +186,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 = "2000.284"; /* version number of this server */
+ time_t alerttime = 0; /* time of last alert */
+ time_t sysalerttime = 0; /* time of last system alert */
+@@ -1131,6 +1142,44 @@
+ 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 /etc/mail/dracd.host config file");
++ 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 ("* ");