diff options
Diffstat (limited to 'mail/panda-imap/files')
18 files changed, 879 insertions, 0 deletions
diff --git a/mail/panda-imap/files/imap-uw.cnf b/mail/panda-imap/files/imap-uw.cnf new file mode 100644 index 000000000000..06610801707b --- /dev/null +++ b/mail/panda-imap/files/imap-uw.cnf @@ -0,0 +1,34 @@ +HOME= . +RANDFILE = $ENV::HOME/.rnd + +[ req ] +default_bits = 1024 +encrypt_key = yes +distinguished_name = req_dn +x509_extensions = cert_type + +[ req_dn ] +countryName = Country Name (2 letter code) +countryName_default = NO +countryName_min = 2 +countryName_max = 2 + +stateOrProvinceName = State or Province Name (full name) +stateOrProvinceName_default = Some-State + +localityName = Locality Name (eg, city) + +0.organizationName = Organization Name (eg, company) +0.organizationName_default = FooBar Inc. + +organizationalUnitName = Organizational Unit Name (eg, section) +#organizationalUnitName_default = + +0.commonName = Common Name (FQDN of your server) + +1.commonName = Common Name (default) +1.commonName_value = localhost + +[ cert_type ] +nsCertType = server + diff --git a/mail/panda-imap/files/patch-Makefile b/mail/panda-imap/files/patch-Makefile new file mode 100644 index 000000000000..1da592cee2a5 --- /dev/null +++ b/mail/panda-imap/files/patch-Makefile @@ -0,0 +1,110 @@ +*** Makefile.orig Wed May 9 00:50:45 2007 +--- Makefile Mon Jul 23 17:45:00 2007 +*************** +*** 164,170 **** + # std system standard (typically passwd file), determined by port + # two try alternative (defined by CHECKPWALT), then std + +! PASSWDTYPE=std + + + # SSL type. Defines whether or not SSL support is on this system +--- 164,170 ---- + # std system standard (typically passwd file), determined by port + # two try alternative (defined by CHECKPWALT), then std + +! PASSWDTYPE=pam + + + # SSL type. Defines whether or not SSL support is on this system +*************** +*** 253,264 **** + # British. As of 2005, the Julian calendar and the Gregorian calendar + # diverge by 15 days. + +! EXTRACFLAGS= + + + # Extra linker flags (additional/alternative libraries, etc.) + +! EXTRALDFLAGS= + + + # Special make flags (e.g. to override make environment variables) +--- 253,264 ---- + # British. As of 2005, the Julian calendar and the Gregorian calendar + # diverge by 15 days. + +! EXTRACFLAGS=-I$(PREFIX)/include/c-client + + + # Extra linker flags (additional/alternative libraries, etc.) + +! EXTRALDFLAGS=-L$(PREFIX)/lib -lc-client4 + + + # Special make flags (e.g. to override make environment variables) +*************** +*** 294,306 **** + + # Make the IMAP Toolkit + +! all: c-client SPECIALS rebuild bundled +! +! c-client: +! @echo Not processed yet. In a first-time build, you must specify +! @echo the system type so that the sources are properly processed. +! @false +! + + SPECIALS: + echo $(SPECIALS) > SPECIALS +--- 294,300 ---- + + # Make the IMAP Toolkit + +! all: bundled + + SPECIALS: + echo $(SPECIALS) > SPECIALS +*************** +*** 559,567 **** + @echo + In order to rectify this problem, you MUST build with: + @echo ++ SSLTYPE=$(SSLTYPE).nopwd + @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +- @echo +- @echo Do you want to continue this build anyway? Type y or n please: +- @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make nounenc;exit 1);; esac' + + nounenc: + @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +--- 553,558 ---- +*************** +*** 582,590 **** + @echo ++ SSLTYPE=nopwd + @echo + You must also have OpenSSL or equivalent installed. + @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +- @echo +- @echo Do you want to continue this build anyway? Type y or n please: +- @$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make nonossl;exit 1);; esac' + + nonossl: + @echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +--- 573,578 ---- +*************** +*** 659,665 **** + $(TOOLS)/$@ "$(LN)" src/tmail tmail + $(LN) $(TOOLS)/$@ . + +! build: OSTYPE rebuild rebuildclean bundled + + OSTYPE: + @$(MAKE) ip$(IP) +--- 647,653 ---- + $(TOOLS)/$@ "$(LN)" src/tmail tmail + $(LN) $(TOOLS)/$@ . + +! build: bundled + + OSTYPE: + @$(MAKE) ip$(IP) diff --git a/mail/panda-imap/files/patch-src-dmail-Makefile b/mail/panda-imap/files/patch-src-dmail-Makefile new file mode 100644 index 000000000000..ec87408b7a51 --- /dev/null +++ b/mail/panda-imap/files/patch-src-dmail-Makefile @@ -0,0 +1,26 @@ +--- src/dmail/Makefile.orig 2008-06-04 20:18:34.000000000 +0200 ++++ src/dmail/Makefile 2009-01-16 10:28:52.000000000 +0100 +@@ -31,20 +31,12 @@ + + # Get local definitions from c-client directory + +-CC = `cat $C/CCTYPE` +-CFLAGS = -I$C `cat $C/CFLAGS` +-LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS` ++CFLAGS+= -DNFSKLUDGE -I$(LOCALBASE)/include/c-client ++LDFLAGS+= -L$(LOCALBASE)/lib -lc-client4 + +-dmail: $(CCLIENTLIB) dmail.o dquota.o ++dmail: dmail.o dquota.o + $(CC) $(CFLAGS) -o dmail dmail.o dquota.o $(LDFLAGS) + +-dmail.o: $C/mail.h $C/misc.h $C/osdep.h dquota.h +- +-dquota.o: dquota.h +- +-$(CCLIENTLIB): +- cd $C;make +- + clean: + rm -f *.o dmail + diff --git a/mail/panda-imap/files/patch-src-mlock-Makefile b/mail/panda-imap/files/patch-src-mlock-Makefile new file mode 100644 index 000000000000..279633e872b9 --- /dev/null +++ b/mail/panda-imap/files/patch-src-mlock-Makefile @@ -0,0 +1,12 @@ +--- src/mlock/Makefile.orig Wed Nov 27 04:06:19 2002 ++++ src/mlock/Makefile Wed Nov 27 04:09:37 2002 +@@ -22,8 +22,7 @@ + + # Get local definitions from c-client directory + +-CC = `cat $C/CCTYPE` +-CFLAGS = `cat $C/CFLAGS` ++CFLAGS+= -DNFSKLUDGE + + all: mlock + diff --git a/mail/panda-imap/files/patch-src-osdep-unix-env_unix.c b/mail/panda-imap/files/patch-src-osdep-unix-env_unix.c new file mode 100644 index 000000000000..034709596f47 --- /dev/null +++ b/mail/panda-imap/files/patch-src-osdep-unix-env_unix.c @@ -0,0 +1,11 @@ +--- src/osdep/unix/env_unix.c.orig 2013-06-21 23:29:17.000000000 +0200 ++++ src/osdep/unix/env_unix.c 2014-11-23 22:48:04.000000000 +0100 +@@ -76,7 +76,7 @@ + static short anonymous = NIL; /* is anonymous */ + static short blackBox = NIL; /* is a black box */ + static short closedBox = NIL; /* is a closed box (uses chroot() jail) */ +-static long restrictBox = NIL; /* is a restricted box */ ++static long restrictBox = -1; /* is a restricted box */ + static short has_no_life = NIL; /* is a cretin with no life */ + /* block environment init */ + static short block_env_init = NIL; diff --git a/mail/panda-imap/files/patch-src-tmail-Makefile b/mail/panda-imap/files/patch-src-tmail-Makefile new file mode 100644 index 000000000000..f45c29d32d2d --- /dev/null +++ b/mail/panda-imap/files/patch-src-tmail-Makefile @@ -0,0 +1,26 @@ +--- src/tmail/Makefile.orig 2008-06-04 20:18:34.000000000 +0200 ++++ src/tmail/Makefile 2009-01-16 10:30:24.000000000 +0100 +@@ -31,20 +31,12 @@ + + # Get local definitions from c-client directory + +-CC = `cat $C/CCTYPE` +-CFLAGS = -I$C `cat $C/CFLAGS` +-LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS` ++CFLAGS+= -DNFSKLUDGE -I$(LOCALBASE)/include/c-client ++LDFLAGS+= -L$(LOCALBASE)/lib -lc-client4 + +-tmail: $(CCLIENTLIB) tmail.o tquota.o ++tmail: tmail.o tquota.o + $(CC) $(CFLAGS) -o tmail tmail.o tquota.o $(LDFLAGS) + +-tmail.o: $C/mail.h $C/misc.h $C/osdep.h tquota.h +- +-tquota.o: tquota.h +- +-$(CCLIENTLIB): +- cd $C;make +- + clean: + rm -f *.o tmail + diff --git a/mail/panda-imap/files/patch-src__imapd__imapd.8 b/mail/panda-imap/files/patch-src__imapd__imapd.8 new file mode 100644 index 000000000000..dfc14334836e --- /dev/null +++ b/mail/panda-imap/files/patch-src__imapd__imapd.8 @@ -0,0 +1,11 @@ +--- src/imapd/imapd.8.orig Sun Sep 30 16:06:25 2007 ++++ src/imapd/imapd.8 Sun Sep 30 16:06:38 2007 +@@ -16,7 +16,7 @@ + .SH NAME + IMAPd \- Internet Message Access Protocol server + .SH SYNOPSIS +-.B /usr/etc/imapd ++.B /usr/local/libexec/imapd + .SH DESCRIPTION + .I imapd + is a server which supports the diff --git a/mail/panda-imap/files/patch-src__ipopd__ipopd.8 b/mail/panda-imap/files/patch-src__ipopd__ipopd.8 new file mode 100644 index 000000000000..a712defab505 --- /dev/null +++ b/mail/panda-imap/files/patch-src__ipopd__ipopd.8 @@ -0,0 +1,14 @@ +--- src/ipopd/ipopd.8.orig Sun Sep 30 16:08:01 2007 ++++ src/ipopd/ipopd.8 Sun Sep 30 16:08:10 2007 +@@ -16,9 +16,9 @@ + .SH NAME + IPOPd \- Post Office Protocol server + .SH SYNOPSIS +-.B /usr/etc/ipop2d ++.B /usr/local/libexec/ipop2d + .PP +-.B /usr/etc/ipop3d ++.B /usr/local/libexec/ipop3d + .SH DESCRIPTION + .I ipop2d + and diff --git a/mail/panda-imap/files/patch-src_imapd_Makefile b/mail/panda-imap/files/patch-src_imapd_Makefile new file mode 100644 index 000000000000..ef72fc24c6aa --- /dev/null +++ b/mail/panda-imap/files/patch-src_imapd_Makefile @@ -0,0 +1,61 @@ +--- src/imapd/Makefile.orig 2013-06-21 23:29:17.000000000 +0200 ++++ src/imapd/Makefile 2014-12-14 14:44:16.000000000 +0100 +@@ -26,11 +26,11 @@ + # http://www.apache.org/licenses/LICENSE-2.0 + + +-ALERT=/etc/imapd.alert ++ALERT=$(PREFIX)/etc/imapd.alert + USERALERT=.imapalert +-SHUTDOWN=/etc/nologin +-ANO=/etc/anonymous.newsgroups +-NNTP=/etc/imapd.nntp ++SHUTDOWN=$(PREFIX)/etc/nologin ++ANO=$(PREFIX)/etc/anonymous.newsgroups ++NNTP=$(PREFIX)//etc/imapd.nntp + SHELL= /bin/sh + + +@@ -38,7 +38,9 @@ + # causes the "Manage Mail" menu item to open the given URL, e.g. to point to + # an alternative IMAP client (e.g. Pine) or perhaps to a homebrew mail + # account management page. +-#NSBD= -DNETSCAPE_BRAIN_DAMAGE=\"http://sourceforge.net/projects/re-alpine\" ++.if defined(WITH_NETSCAPE_BRAIN_DAMAGE) ++NSBD= -DNETSCAPE_BRAIN_DAMAGE=\"http://sourceforge.net/projects/re-alpine\" ++.endif + + # Un-comment to enable the ESEARCH command. Unfortunately, the iOS4 Mail + # client misinterprets the ESEARCH results due to an ambiguity in RFC 4731. +@@ -46,23 +48,21 @@ + + # Get local definitions from c-client directory + +-C = ../c-client +-CCLIENTLIB = $C/c-client.a +-CC = `cat $C/CCTYPE` +-CFLAGS = -I$C `cat $C/CFLAGS` $(NSBD) $(ESEARCH) -DANOFILE=\"$(ANO)\" \ ++CFLAGS = -DNFSKLUDGE -I$(LOCALBASE)/include/c-client $(NSBD) \ ++ -DANOFILE=\"$(ANO)\" \ + -DALERTFILE=\"$(ALERT)\" -DNNTPFILE=\"$(NNTP)\" \ + -DUSERALERTFILE=\"$(USERALERT)\" -DSHUTDOWNFILE=\"$(SHUTDOWN)\" +-LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS` ++LDFLAGS+= $(EXTRALDFLAGS) -L$(LOCALBASE)/lib -lc-client4 ++.if defined(WITH_DRAC) ++CFLAGS+= -DETC_DIR=\"$(PREFIX)/etc\" -DDRAC_AUTH ++LDFLAGS+= -ldrac ++.endif + + all: imapd + +-imapd: $(CCLIENTLIB) imapd.o ++imapd: imapd.o + $(CC) $(CFLAGS) -o imapd imapd.o $(LDFLAGS) + +-imapd.o: $C/mail.h $C/misc.h $C/osdep.h +- +-$(CCLIENTLIB): +- cd $C;make + + clean: + rm -f *.o imapd || true diff --git a/mail/panda-imap/files/patch-src_imapd_imapd.c b/mail/panda-imap/files/patch-src_imapd_imapd.c new file mode 100644 index 000000000000..a6988d8ea9e3 --- /dev/null +++ b/mail/panda-imap/files/patch-src_imapd_imapd.c @@ -0,0 +1,89 @@ +--- src/imapd/imapd.c.orig 2013-06-21 23:29:17.000000000 +0200 ++++ src/imapd/imapd.c 2014-11-23 22:59:07.000000000 +0100 +@@ -37,6 +37,11 @@ + #include "newsrc.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 */ + +@@ -214,6 +219,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 = "417"; /* edit number of this server */ + char *logout = "Logout"; /* syslogreason for logout */ + char *goodbye = NIL; /* bye reason */ +@@ -294,7 +305,50 @@ + msg_string_next, /* get next byte in string structure */ + msg_string_setpos /* set position in string structure */ + }; +- ++ ++#ifdef DRAC_AUTH ++/* DRAC Authorization ++ */ ++void 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 */ ++ + /* Main program */ + + int main (int argc,char *argv[]) +@@ -1613,6 +1667,9 @@ + lasterror ()); + return; + } ++ #ifdef DRAC_AUTH ++ drac_auth(); ++ #endif /* DRAC_AUTH */ + /* change in number of messages? */ + if (existsquelled || (nmsgs != stream->nmsgs)) { + PSOUT ("* "); diff --git a/mail/panda-imap/files/patch-src_ipopd_Makefile b/mail/panda-imap/files/patch-src_ipopd_Makefile new file mode 100644 index 000000000000..2464eff218fd --- /dev/null +++ b/mail/panda-imap/files/patch-src_ipopd_Makefile @@ -0,0 +1,41 @@ +--- src/ipopd/Makefile.orig Wed Oct 25 01:55:07 2000 ++++ src/ipopd/Makefile Mon Oct 1 03:44:26 2001 +@@ -19,29 +19,25 @@ + + + C = ../c-client +-CCLIENTLIB = $C/c-client.a ++#CCLIENTLIB = $C/c-client.a + SHELL = /bin/sh + + # Get local definitions from c-client directory + +-CC = `cat $C/CCTYPE` +-CFLAGS = -I$C `cat $C/CFLAGS` +-LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS` ++CFLAGS+= -DNFSKLUDGE -I$(LOCALBASE)/include/c-client ++LDFLAGS+= -L$(LOCALBASE)/lib -lc-client4 ++.if defined(WITH_DRAC) ++CFLAGS+= -DDRAC_AUTH -DETC_DIR=\"$(PREFIX)/etc\" ++LDFLAGS+= -ldrac ++.endif + + ipopd: ipop2d ipop3d + +-ipop2d: $(CCLIENTLIB) ipop2d.o ++ipop2d: ipop2d.o + $(CC) $(CFLAGS) -o ipop2d ipop2d.o $(LDFLAGS) + +-ipop3d: $(CCLIENTLIB) ipop3d.o ++ipop3d: ipop3d.o + $(CC) $(CFLAGS) -o ipop3d ipop3d.o $(LDFLAGS) +- +-ipop2d.o: $C/mail.h $C/misc.h $C/osdep.h +- +-ipop3d.o: $C/mail.h $C/misc.h $C/osdep.h +- +-$(CCLIENTLIB): +- cd $C;make + + clean: + rm -f *.o ipop2d ipop3d || true diff --git a/mail/panda-imap/files/patch-src_ipopd_ipop3d.c b/mail/panda-imap/files/patch-src_ipopd_ipop3d.c new file mode 100644 index 000000000000..a9f3715c6158 --- /dev/null +++ b/mail/panda-imap/files/patch-src_ipopd_ipop3d.c @@ -0,0 +1,131 @@ +--- src/ipopd/ipop3d.c.orig 2008-06-04 20:18:34.000000000 +0200 ++++ src/ipopd/ipop3d.c 2009-01-16 10:19:50.000000000 +0100 +@@ -34,6 +34,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 */ + + #define CRLF PSOUT ("\015\012") /* primary output terpri */ + +@@ -59,6 +64,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 = "104"; /* edit number of this server */ + short state = AUTHORIZATION; /* server state */ + short critical = NIL; /* non-zero if in critical code */ +@@ -100,7 +111,53 @@ + int mbxopen (char *mailbox); + long blat (char *text,long lines,unsigned long size,STRING *st); + void rset (); +- ++#ifdef DRAC_AUTH ++void drac_auth(); ++#endif /* DRAC_AUTH */ ++ ++#ifdef DRAC_AUTH ++/* DRAC Authorization ++ */ ++void 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 */ ++ + /* Main program */ + + int main (int argc,char *argv[]) +@@ -113,7 +170,7 @@ + (((s = strrchr (argv[0],'/')) || (s = strrchr (argv[0],'\\'))) ? + s+1 : argv[0]) : "ipop3d"; + /* set service name before linkage */ +- mail_parameters (NIL,SET_SERVICENAME,(void *) "pop"); ++ mail_parameters (NIL,SET_SERVICENAME,(void *) "pop3"); + #include "linkage.c" + /* initialize server */ + server_init (pgmname,"pop3","pop3s",clkint,kodint,hupint,trmint,NIL); +@@ -228,9 +285,13 @@ + syslog (LOG_INFO,"AUTHENTICATE %s failure host=%.80s",s, + tcp_clienthost ()); + } +- else if ((state = mbxopen ("INBOX")) == TRANSACTION) ++ else if ((state = mbxopen ("INBOX")) == TRANSACTION) { ++ #ifdef DRAC_AUTH ++ drac_auth(); ++ #endif /* DRAC_AUTH */ + syslog (LOG_INFO,"Auth user=%.80s host=%.80s nmsgs=%lu/%lu", + user,tcp_clienthost (),nmsgs,stream->nmsgs); ++ } + else syslog (LOG_INFO,"Auth user=%.80s host=%.80s no mailbox", + user,tcp_clienthost ()); + } +@@ -260,9 +321,13 @@ + PSOUT ("-ERR Missing APOP argument\015\012"); + else if (!(user = apop_login (challenge,s,t,argc,argv))) + PSOUT ("-ERR Bad APOP\015\012"); +- else if ((state = mbxopen ("INBOX")) == TRANSACTION) ++ else if ((state = mbxopen ("INBOX")) == TRANSACTION) { ++ #ifdef DRAC_AUTH ++ drac_auth(); ++ #endif /* DRAC_AUTH */ + syslog (LOG_INFO,"APOP user=%.80s host=%.80s nmsgs=%lu/%lu", + user,tcp_clienthost (),nmsgs,stream->nmsgs); ++ } + else syslog (LOG_INFO,"APOP user=%.80s host=%.80s no mailbox", + user,tcp_clienthost ()); + } +@@ -665,6 +730,9 @@ + /* attempt the login */ + if (server_login (user,pass,t,argc,argv)) { + int ret = mbxopen ("INBOX"); ++ #ifdef DRAC_AUTH ++ drac_auth(); ++ #endif /* DRAC_AUTH */ + if (ret == TRANSACTION) /* mailbox opened OK? */ + syslog (LOG_INFO,"%sLogin user=%.80s host=%.80s nmsgs=%lu/%lu", + t ? "Admin " : "",user,tcp_clienthost (),nmsgs,stream->nmsgs); diff --git a/mail/panda-imap/files/patch-src_mailutil_Makefile b/mail/panda-imap/files/patch-src_mailutil_Makefile new file mode 100644 index 000000000000..eb7a3dd9f880 --- /dev/null +++ b/mail/panda-imap/files/patch-src_mailutil_Makefile @@ -0,0 +1,28 @@ +--- src/mailutil/Makefile.orig Tue Nov 19 01:41:46 2002 ++++ src/mailutil/Makefile Wed Nov 27 03:51:27 2002 +@@ -19,22 +19,15 @@ + + + C = ../c-client +-CCLIENTLIB = $C/c-client.a + SHELL = /bin/sh + + # Get local definitions from c-client directory + +-CC = `cat $C/CCTYPE` +-CFLAGS = -I$C `cat $C/CFLAGS` +-LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS` ++CFLAGS+= -DNFSKLUDGE -I$(LOCALBASE)/include/c-client ++LDFLAGS+= -L$(LOCALBASE)/lib -lc-client4 + +-mailutil: $(CCLIENTLIB) mailutil.o ++mailutil: mailutil.o + $(CC) $(CFLAGS) -o mailutil mailutil.o $(LDFLAGS) +- +-mailutil.o: $C/mail.h $C/misc.h $C/osdep.h +- +-$(CCLIENTLIB): +- cd $C;make + + clean: + rm -f *.o mailutil diff --git a/mail/panda-imap/files/patch-src_mtest_Makefile b/mail/panda-imap/files/patch-src_mtest_Makefile new file mode 100644 index 000000000000..041d6a63b98e --- /dev/null +++ b/mail/panda-imap/files/patch-src_mtest_Makefile @@ -0,0 +1,30 @@ +--- src/mtest/Makefile.orig Wed Oct 25 01:55:39 2000 ++++ src/mtest/Makefile Mon Oct 1 03:42:11 2001 +@@ -19,24 +19,17 @@ + + + C = ../c-client +-CCLIENTLIB = $C/c-client.a + SHELL = /bin/sh + + # Get local definitions from c-client directory + +-CC = `cat $C/CCTYPE` +-CFLAGS = -I$C `cat $C/CFLAGS` +-LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS` ++CFLAGS+= -DNFSKLUDGE -I$(LOCALBASE)/include/c-client ++LDFLAGS+= -L$(LOCALBASE)/lib -lc-client4 + + all: mtest + +-mtest: $(CCLIENTLIB) mtest.o ++mtest: mtest.o + $(CC) $(CFLAGS) -o mtest mtest.o $(LDFLAGS) +- +-mtest.o: $C/mail.h $C/misc.h $C/osdep.h $C/rfc822.h $C/smtp.h $C/nntp.h +- +-$(CCLIENTLIB): +- cd $C;make + + clean: + rm -f *.o mtest || true diff --git a/mail/panda-imap/files/patch-src_mtest_mtest.c b/mail/panda-imap/files/patch-src_mtest_mtest.c new file mode 100644 index 000000000000..a3b490909a09 --- /dev/null +++ b/mail/panda-imap/files/patch-src_mtest_mtest.c @@ -0,0 +1,47 @@ +--- src/mtest/mtest.c.orig Sat May 29 08:07:06 1999 ++++ src/mtest/mtest.c Sun Dec 19 15:29:29 1999 +@@ -95,6 +95,7 @@ + void status (MAILSTREAM *stream); + void prompt (char *msg,char *txt); + void smtptest (long debug); ++char *safegets(char *buf); + + /* Main program - initialization */ + +@@ -528,7 +529,7 @@ + void prompt (char *msg,char *txt) + { + printf ("%s",msg); +- gets (txt); ++ safegets (txt); + } + + /* Interfaces to C-client */ +@@ -713,7 +714,7 @@ + puts (" Msg (end with a line with only a '.'):"); + body->type = TYPETEXT; + *text = '\0'; +- while (gets (line)) { ++ while (safegets (line)) { + if (line[0] == '.') { + if (line[1] == '\0') break; + else strcat (text,"."); +@@ -744,4 +745,18 @@ + else puts ("[Can't open connection to any server]"); + mail_free_envelope (&msg); + mail_free_body (&body); ++} ++ ++char *safegets(char *buf) { ++ char *p; ++ ++ if (!fgets(buf, MAILTMPLEN, stdin)) { ++ return NULL; ++ } ++ ++ if ((p = strchr(buf, '\n')) != NULL) { ++ *p = '\0'; ++ } ++ ++ return buf; + } diff --git a/mail/panda-imap/files/patch-src_osdep_unix_Makefile b/mail/panda-imap/files/patch-src_osdep_unix_Makefile new file mode 100644 index 000000000000..d81228f915c0 --- /dev/null +++ b/mail/panda-imap/files/patch-src_osdep_unix_Makefile @@ -0,0 +1,154 @@ +*** src/osdep/unix/Makefile.orig Sun Jun 17 17:37:44 2007 +--- src/osdep/unix/Makefile Mon Jul 23 17:34:03 2007 +*************** +*** 54,66 **** + + # Extended flags needed for SSL. You may need to modify. + +! SSLDIR=/usr/local/ssl +! SSLCERTS=$(SSLDIR)/certs + SSLKEYS=$(SSLCERTS) + SSLINCLUDE=$(SSLDIR)/include + SSLLIB=$(SSLDIR)/lib + +! SSLCRYPTO=-lcrypto + + # Older versions of MIT Kerberos also have a libcrypto. If so, you may need + # to use this instead +--- 54,66 ---- + + # Extended flags needed for SSL. You may need to modify. + +! #SSLDIR=/usr/local/ssl +! SSLCERTS=$(PREFIX)/certs + SSLKEYS=$(SSLCERTS) + SSLINCLUDE=$(SSLDIR)/include + SSLLIB=$(SSLDIR)/lib + +! SSLCRYPTO=-lcrypto -lcrypt + + # Older versions of MIT Kerberos also have a libcrypto. If so, you may need + # to use this instead +*************** +*** 73,79 **** + + SSLCFLAGS= -I$(SSLINCLUDE) -I$(SSLINCLUDE)/openssl\ + -DSSL_CERT_DIRECTORY=\"$(SSLCERTS)\" -DSSL_KEY_DIRECTORY=\"$(SSLKEYS)\" +! SSLLDFLAGS= -L$(SSLLIB) -lssl $(SSLCRYPTO) $(SSLRSA) + + + # Extended flags needed for non-standard passwd types. You may need to modify. +--- 73,79 ---- + + SSLCFLAGS= -I$(SSLINCLUDE) -I$(SSLINCLUDE)/openssl\ + -DSSL_CERT_DIRECTORY=\"$(SSLCERTS)\" -DSSL_KEY_DIRECTORY=\"$(SSLKEYS)\" +! SSLLDFLAGS= # -L$(SSLLIB) -lssl $(SSLCRYPTO) $(SSLRSA) + + + # Extended flags needed for non-standard passwd types. You may need to modify. +*************** +*** 87,93 **** + # AFSLDFLAGS may also need -L/usr/ucblib -lucb + DCECFLAGS= -DDCE_MINIMAL -DPASSWD_OVERRIDE=\"/opt/pop3/passwd/passwd\" + DCELDFLAGS= -ldce +! PAMLDFLAGS= -lpam -ldl + + + # Build parameters normally set by the individual port +--- 87,93 ---- + # AFSLDFLAGS may also need -L/usr/ucblib -lucb + DCECFLAGS= -DDCE_MINIMAL -DPASSWD_OVERRIDE=\"/opt/pop3/passwd/passwd\" + DCELDFLAGS= -ldce +! PAMLDFLAGS= # -lpam -lcrypt + + + # Build parameters normally set by the individual port +*************** +*** 125,131 **** + # Commands possibly overriden by the individual port + + ARRC=ar rc +! CC=cc + LN=ln -s + RANLIB=ranlib + +--- 125,131 ---- + # Commands possibly overriden by the individual port + + ARRC=ar rc +! CC?=cc + LN=ln -s + RANLIB=ranlib + +*************** +*** 149,155 **** + 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 +! CFLAGS=-g + + CAT=cat + MAKE=make +--- 149,155 ---- + 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 +! CFLAGS+=$(BASECFLAGS) $(EXTRACFLAGS) + + CAT=cat + MAKE=make +*************** +*** 232,237 **** +--- 232,246 ---- + 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 \ +*************** +*** 251,258 **** + SPOOLDIR=/var \ + ACTIVEFILE=/usr/local/news/lib/active \ + RSHPATH=/usr/bin/rsh \ + BASECFLAGS="$(GCCCFLAGS)" \ +! BASELDFLAGS="-lcrypt" + + bsi: # BSD/i386 + $(BUILD) `$(CAT) SPECIALS` OS=$@ \ +--- 260,268 ---- + SPOOLDIR=/var \ + ACTIVEFILE=/usr/local/news/lib/active \ + RSHPATH=/usr/bin/rsh \ ++ LOCKPGM=$(PREFIX)/libexec/mlock \ + BASECFLAGS="$(GCCCFLAGS)" \ +! BASELDFLAGS="" + + bsi: # BSD/i386 + $(BUILD) `$(CAT) SPECIALS` OS=$@ \ +*************** +*** 842,848 **** + + build: clean once $(ARCHIVE) + +! all: $(ARCHIVE) + + $(ARCHIVE): $(BINARIES) + sh -c '$(RM) $(ARCHIVE) || true' +--- 852,858 ---- + + build: clean once $(ARCHIVE) + +! all: onceenv + + $(ARCHIVE): $(BINARIES) + sh -c '$(RM) $(ARCHIVE) || true' diff --git a/mail/panda-imap/files/patch-src_osdep_unix_os_bsi.h b/mail/panda-imap/files/patch-src_osdep_unix_os_bsi.h new file mode 100644 index 000000000000..4615f235b3fb --- /dev/null +++ b/mail/panda-imap/files/patch-src_osdep_unix_os_bsi.h @@ -0,0 +1,21 @@ +--- src/osdep/unix/os_bsi.h.orig Sat Oct 19 20:30:04 1996 ++++ src/osdep/unix/os_bsi.h Sun May 24 10:46:33 1998 +@@ -37,7 +37,18 @@ + #include <unistd.h> + #include <string.h> + #include <sys/types.h> ++ ++/* ++ * FreeBSD v3.x and onward whines about <sys/dir.h> being obsolete, so switch ++ * to POSIX semantics. ++ */ ++#if __FreeBSD__ >= 3 ++#include <dirent.h> ++#define direct dirent ++#else + #include <sys/dir.h> ++#endif ++ + #include <fcntl.h> + #include <syslog.h> + #include <sys/file.h> diff --git a/mail/panda-imap/files/pkg-message.in b/mail/panda-imap/files/pkg-message.in new file mode 100644 index 000000000000..21f0badd3448 --- /dev/null +++ b/mail/panda-imap/files/pkg-message.in @@ -0,0 +1,33 @@ +The ipop2d, ipop3d, and imapd daemons should be invoked by your +/etc/inetd.conf file with lines such as: + +pop2 stream tcp nowait root %%PREFIX%%/libexec/ipop2d ipop2d +pop3 stream tcp nowait root %%PREFIX%%/libexec/ipop3d ipop3d +imap4 stream tcp nowait root %%PREFIX%%/libexec/imapd imapd + +If PAM authentication support has been compiled in you will need to add +something like the following lines to /etc/pam.conf (PAM authentication is +default): + +imap auth required pam_unix.so +imap account required pam_unix.so +imap session required pam_unix.so +pop3 auth required pam_unix.so +pop3 account required pam_unix.so +pop3 session required pam_unix.so + +The pam_unix module does not have session support, so we do not use it for +session management. Be sure to read up on pam.conf(5). + +To configure imap-uw read %%DOCSDIR%%/imaprc.txt. Particularly consider +changing mail-subdirectory to mail to have ~/mail the default mail +directory as is default in some MUAs, and to avoid having the whole home +dir accessed. + +===> NB: IMAP-UW now rejects non-encrypted logins by default. To change this +===> behaviour, recompile and reinstall cclient and imap-uw ports with one of +===> the following make variables defined: + +WITHOUT_SSL - build without SSL/encryption support. +WITH_SSL_AND_PLAINTEXT - build with SSL/encryption support, but allow +non-encrypted logins. |