View | Details | Raw Unified | Return to bug 114834
Collapse All | Expand All

(-)Makefile (-8 / +6 lines)
Lines 6-12 Link Here
6
#
6
#
7
7
8
PORTNAME=	imap
8
PORTNAME=	imap
9
PORTVERSION=	2004g
9
PORTVERSION=	2006j
10
PORTREVISION=	1
10
PORTREVISION=	1
11
PORTEPOCH=	1
11
PORTEPOCH=	1
12
CATEGORIES=	mail ipv6
12
CATEGORIES=	mail ipv6
Lines 18-23 Link Here
18
PKGNAMESUFFIX=	-uw
18
PKGNAMESUFFIX=	-uw
19
DISTNAME=	imap-${PORTVERSION}
19
DISTNAME=	imap-${PORTVERSION}
20
EXTRACT_SUFX=	.tar.Z
20
EXTRACT_SUFX=	.tar.Z
21
DISTVERSIONSUFFIX=	2
22
DISTFILES=	${DISTNAME}${DISTVERSIONSUFFIX}${EXTRACT_SUFX}
23
21
24
22
MAINTAINER=	anders@FreeBSD.org
25
MAINTAINER=	anders@FreeBSD.org
23
COMMENT=	University of Washington IMAP4rev1/POP2/POP3 mail servers
26
COMMENT=	University of Washington IMAP4rev1/POP2/POP3 mail servers
Lines 28-39 Link Here
28
OPTIONS=	SSL "Compile with SSL support" on \
31
OPTIONS=	SSL "Compile with SSL support" on \
29
		SSL_AND_PLAINTEXT "Allow plain text passwords and SSL" off \
32
		SSL_AND_PLAINTEXT "Allow plain text passwords and SSL" off \
30
		DRAC "Dynamically open MTA for relaying" off \
33
		DRAC "Dynamically open MTA for relaying" off \
31
		NETSCAPE_BRAIN_DAMAGE "See Makefile for documentation" off \
34
		NETSCAPE_BRAIN_DAMAGE "See Makefile for documentation" off
32
		ENTOURAGE_BRAIN_DAMAGE "See Makefile for documentation" off
33
35
34
.include <bsd.port.pre.mk>
36
.include <bsd.port.pre.mk>
35
37
36
LIB_DEPENDS=	c-client4.8:${PORTSDIR}/mail/cclient
38
LIB_DEPENDS=	c-client4.9:${PORTSDIR}/mail/cclient
37
.if defined(WITH_DRAC)
39
.if defined(WITH_DRAC)
38
BUILD_DEPENDS=	${LOCALBASE}/lib/libdrac.a:${PORTSDIR}/mail/drac
40
BUILD_DEPENDS=	${LOCALBASE}/lib/libdrac.a:${PORTSDIR}/mail/drac
39
.endif
41
.endif
Lines 59-68 Link Here
59
# Define this to get somewhat better interoperability with Netscape.
61
# Define this to get somewhat better interoperability with Netscape.
60
.if defined(WITH_NETSCAPE_BRAIN_DAMAGE)
62
.if defined(WITH_NETSCAPE_BRAIN_DAMAGE)
61
MAKE_ARGS+=	WITH_NETSCAPE_BRAIN_DAMAGE=yes
63
MAKE_ARGS+=	WITH_NETSCAPE_BRAIN_DAMAGE=yes
62
.endif
63
# Define this to get possibly better interoperability with Microsoft Entourage.
64
.if defined(WITH_ENTOURAGE_BRAIN_DAMAGE)
65
MAKE_ARGS+=	WITH_ENTOURAGE_BRAIN_DAMAGE=yes
66
.endif
64
.endif
67
# See src/imapd/Makefile for more information about these three options.
65
# See src/imapd/Makefile for more information about these three options.
68
66
(-)distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (imap-2004g.tar.Z) = 9a80f58d8d6a0979c13714ae69050020
1
MD5 (imap-2006j2.tar.Z) = d7900691c415bcc725c1bf2b15e4fb99
2
SHA256 (imap-2004g.tar.Z) = 958ab8a6a8b5a1a53167793141fe5bf1fbafc012be1d3f70a21f5f2f493ffa6d
2
SHA256 (imap-2006j2.tar.Z) = 5b2ed247fd98f81c7a2d23d0822f602d49b742c19761a9c2dad6753f5f3e806e
3
SIZE (imap-2004g.tar.Z) = 2246713
3
SIZE (imap-2006j2.tar.Z) = 2686745
(-)pkg-plist (-8 / +15 lines)
Lines 18-24 Link Here
18
%%PORTDOCS%%%%DOCSDIR%%/calendar.txt
18
%%PORTDOCS%%%%DOCSDIR%%/calendar.txt
19
%%PORTDOCS%%%%DOCSDIR%%/commndmt.txt
19
%%PORTDOCS%%%%DOCSDIR%%/commndmt.txt
20
%%PORTDOCS%%%%DOCSDIR%%/draft/README
20
%%PORTDOCS%%%%DOCSDIR%%/draft/README
21
%%PORTDOCS%%%%DOCSDIR%%/draft/compare.txt
22
%%PORTDOCS%%%%DOCSDIR%%/draft/i18n.txt
21
%%PORTDOCS%%%%DOCSDIR%%/draft/i18n.txt
23
%%PORTDOCS%%%%DOCSDIR%%/draft/sort.txt
22
%%PORTDOCS%%%%DOCSDIR%%/draft/sort.txt
24
%%PORTDOCS%%%%DOCSDIR%%/drivers.txt
23
%%PORTDOCS%%%%DOCSDIR%%/drivers.txt
Lines 28-39 Link Here
28
%%PORTDOCS%%%%DOCSDIR%%/locking.txt
27
%%PORTDOCS%%%%DOCSDIR%%/locking.txt
29
%%PORTDOCS%%%%DOCSDIR%%/md5.txt
28
%%PORTDOCS%%%%DOCSDIR%%/md5.txt
30
%%PORTDOCS%%%%DOCSDIR%%/naming.txt
29
%%PORTDOCS%%%%DOCSDIR%%/naming.txt
31
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc1731.txt
32
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc1732.txt
30
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc1732.txt
33
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc1733.txt
31
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc1733.txt
34
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2061.txt
32
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2061.txt
35
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2062.txt
33
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2062.txt
36
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2086.txt
37
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2087.txt
34
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2087.txt
38
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2088.txt
35
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2088.txt
39
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2177.txt
36
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2177.txt
Lines 42-53 Link Here
42
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2193.txt
39
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2193.txt
43
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2195.txt
40
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2195.txt
44
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2221.txt
41
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2221.txt
45
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2222.txt
46
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2234.txt
47
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2245.txt
48
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2342.txt
42
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2342.txt
49
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2359.txt
50
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2595.txt
51
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2683.txt
43
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2683.txt
52
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2971.txt
44
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc2971.txt
53
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc3348.txt
45
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc3348.txt
Lines 57-62 Link Here
57
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc3516.txt
49
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc3516.txt
58
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc3656.txt
50
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc3656.txt
59
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc3691.txt
51
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc3691.txt
52
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4234.txt
53
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4314.txt
54
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4315.txt
55
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4422.txt
56
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4466.txt
57
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4467.txt
58
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4468.txt
59
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4469.txt
60
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4505.txt
61
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4549.txt
62
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4551.txt
63
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4616.txt
64
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4731.txt
65
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4752.txt
66
%%PORTDOCS%%%%DOCSDIR%%/rfc/rfc4790.txt
60
%%PORTDOCS%%@dirrm %%DOCSDIR%%/draft
67
%%PORTDOCS%%@dirrm %%DOCSDIR%%/draft
61
%%PORTDOCS%%@dirrm %%DOCSDIR%%/rfc
68
%%PORTDOCS%%@dirrm %%DOCSDIR%%/rfc
62
%%PORTDOCS%%@dirrm %%DOCSDIR%%
69
%%PORTDOCS%%@dirrm %%DOCSDIR%%
(-)files/patch-ab (-92 / +154 lines)
Lines 1-92 Link Here
1
--- src/osdep/unix/Makefile.orig	Sat Apr 30 22:51:13 2005
1
*** src/osdep/unix/Makefile.orig	Sun Jun 17 17:37:44 2007
2
+++ src/osdep/unix/Makefile	Sun Jul  1 22:36:01 2007
2
--- src/osdep/unix/Makefile	Mon Jul 23 17:34:03 2007
3
@@ -41,13 +41,13 @@
3
***************
4
 
4
*** 54,66 ****
5
 # Extended flags needed for SSL.  You may need to modify.
5
  
6
 
6
  # Extended flags needed for SSL.  You may need to modify.
7
-SSLDIR=/usr/local/ssl
7
  
8
-SSLCERTS=$(SSLDIR)/certs
8
! SSLDIR=/usr/local/ssl
9
+#SSLDIR=/usr/local/ssl
9
! SSLCERTS=$(SSLDIR)/certs
10
+SSLCERTS=$(PREFIX)/certs
10
  SSLKEYS=$(SSLCERTS)
11
 SSLKEYS=$(SSLCERTS)
11
  SSLINCLUDE=$(SSLDIR)/include
12
 SSLINCLUDE=$(SSLDIR)/include
12
  SSLLIB=$(SSLDIR)/lib
13
 SSLLIB=$(SSLDIR)/lib
13
  
14
 
14
! SSLCRYPTO=-lcrypto
15
-SSLCRYPTO=-lcrypto
15
  
16
+SSLCRYPTO=-lcrypto -lcrypt
16
  # Older versions of MIT Kerberos also have a libcrypto.  If so, you may need
17
 
17
  # to use this instead
18
 # Older versions of MIT Kerberos also have a libcrypto.  If so, you may need
18
--- 54,66 ----
19
 # to use this instead
19
  
20
@@ -60,7 +60,7 @@
20
  # Extended flags needed for SSL.  You may need to modify.
21
 
21
  
22
 SSLCFLAGS= -I$(SSLINCLUDE) -I$(SSLINCLUDE)/openssl\
22
! #SSLDIR=/usr/local/ssl
23
  -DSSL_CERT_DIRECTORY=\"$(SSLCERTS)\" -DSSL_KEY_DIRECTORY=\"$(SSLKEYS)\"
23
! SSLCERTS=$(PREFIX)/certs
24
-SSLLDFLAGS= -L$(SSLLIB) -lssl $(SSLCRYPTO) $(SSLRSA)
24
  SSLKEYS=$(SSLCERTS)
25
+SSLLDFLAGS= # -L$(SSLLIB) -lssl $(SSLCRYPTO) $(SSLRSA)
25
  SSLINCLUDE=$(SSLDIR)/include
26
 
26
  SSLLIB=$(SSLDIR)/lib
27
 
27
  
28
 # Extended flags needed for non-standard passwd types.  You may need to modify.
28
! SSLCRYPTO=-lcrypto -lcrypt
29
@@ -74,7 +74,7 @@
29
  
30
 # AFSLDFLAGS may also need -L/usr/ucblib -lucb
30
  # Older versions of MIT Kerberos also have a libcrypto.  If so, you may need
31
 DCECFLAGS= -DDCE_MINIMAL -DPASSWD_OVERRIDE=\"/opt/pop3/passwd/passwd\"
31
  # to use this instead
32
 DCELDFLAGS= -ldce
32
***************
33
-PAMLDFLAGS= -lpam -ldl
33
*** 73,79 ****
34
+PAMLDFLAGS= # -lpam -lcrypt
34
  
35
 
35
  SSLCFLAGS= -I$(SSLINCLUDE) -I$(SSLINCLUDE)/openssl\
36
 
36
   -DSSL_CERT_DIRECTORY=\"$(SSLCERTS)\" -DSSL_KEY_DIRECTORY=\"$(SSLKEYS)\"
37
 # Build parameters normally set by the individual port
37
! SSLLDFLAGS= -L$(SSLLIB) -lssl $(SSLCRYPTO) $(SSLRSA)
38
@@ -111,7 +111,7 @@
38
  
39
 # Commands possibly overriden by the individual port
39
  
40
 
40
  # Extended flags needed for non-standard passwd types.  You may need to modify.
41
 ARRC=ar rc
41
--- 73,79 ----
42
-CC=cc
42
  
43
+CC?=cc
43
  SSLCFLAGS= -I$(SSLINCLUDE) -I$(SSLINCLUDE)/openssl\
44
 LN=ln -s
44
   -DSSL_CERT_DIRECTORY=\"$(SSLCERTS)\" -DSSL_KEY_DIRECTORY=\"$(SSLKEYS)\"
45
 RANLIB=ranlib
45
! SSLLDFLAGS= # -L$(SSLLIB) -lssl $(SSLCRYPTO) $(SSLRSA)
46
 
46
  
47
@@ -129,7 +129,7 @@
47
  
48
  dummy.o pseudo.o netmsg.o flstring.o fdstring.o \
48
  # Extended flags needed for non-standard passwd types.  You may need to modify.
49
  rfc822.o nntp.o smtp.o imap4r1.o pop3.o \
49
***************
50
  unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o
50
*** 87,93 ****
51
-CFLAGS=-g
51
  # AFSLDFLAGS may also need -L/usr/ucblib -lucb
52
+CFLAGS+=$(BASECFLAGS) $(EXTRACFLAGS)
52
  DCECFLAGS= -DDCE_MINIMAL -DPASSWD_OVERRIDE=\"/opt/pop3/passwd/passwd\"
53
 
53
  DCELDFLAGS= -ldce
54
 CAT=cat
54
! PAMLDFLAGS= -lpam -ldl
55
 MAKE=make
55
  
56
@@ -212,6 +212,15 @@
56
  
57
 	 BASECFLAGS="-g -B/usr/lib/big/ -Dvoid=char -Dconst=" \
57
  # Build parameters normally set by the individual port
58
 	 RANLIB=true ARRC="ar -rc"
58
--- 87,93 ----
59
 
59
  # AFSLDFLAGS may also need -L/usr/ucblib -lucb
60
+bfp:	# FreeBSD Pluggable Authentication Modules
60
  DCECFLAGS= -DDCE_MINIMAL -DPASSWD_OVERRIDE=\"/opt/pop3/passwd/passwd\"
61
+	$(BUILD) `cat SPECIALS` OS=bsi SIGTYPE=psx CHECKPW=pam \
61
  DCELDFLAGS= -ldce
62
+	 SPOOLDIR=/var \
62
! PAMLDFLAGS= # -lpam -lcrypt
63
+	 ACTIVEFILE=/usr/local/news/lib/active \
63
  
64
+	 RSHPATH=/usr/bin/rsh \
64
  
65
+	 LOCKPGM=$(PREFIX)/libexec/mlock \
65
  # Build parameters normally set by the individual port
66
+	 BASECFLAGS="-DNFSKLUDGE" \
66
***************
67
+	 BASELDFLAGS="-lpam -lcrypt"
67
*** 125,131 ****
68
+
68
  # Commands possibly overriden by the individual port
69
 bs3:	# BSD/i386 3.0 or higher
69
  
70
 	$(BUILD) `$(CAT) SPECIALS` OS=bsi \
70
  ARRC=ar rc
71
 	 CHECKPW=bsi LOGINPW=bsi CRXTYPE=nfs \
71
! CC=cc
72
@@ -231,8 +240,9 @@
72
  LN=ln -s
73
 	 SPOOLDIR=/var \
73
  RANLIB=ranlib
74
 	 ACTIVEFILE=/usr/local/news/lib/active \
74
  
75
 	 RSHPATH=/usr/bin/rsh \
75
--- 125,131 ----
76
-	 BASECFLAGS="-g -O -pipe" \
76
  # Commands possibly overriden by the individual port
77
-	 BASELDFLAGS="-lcrypt"
77
  
78
+	 LOCKPGM=$(PREFIX)/libexec/mlock \
78
  ARRC=ar rc
79
+	 BASECFLAGS="-DNFSKLUDGE" \
79
! CC?=cc
80
+	 BASELDFLAGS=""
80
  LN=ln -s
81
 
81
  RANLIB=ranlib
82
 bsi:	# BSD/i386
82
  
83
 	$(BUILD) `$(CAT) SPECIALS` OS=$@ \
83
***************
84
@@ -803,7 +813,7 @@
84
*** 149,155 ****
85
 
85
   dummy.o pseudo.o netmsg.o flstring.o fdstring.o \
86
 build:	clean once $(ARCHIVE)
86
   rfc822.o nntp.o smtp.o imap4r1.o pop3.o \
87
 
87
   unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o mix.o
88
-all:	$(ARCHIVE)
88
! CFLAGS=-g
89
+all:	onceenv
89
  
90
 
90
  CAT=cat
91
 $(ARCHIVE): $(BINARIES)
91
  MAKE=make
92
 	sh -c '$(RM) $(ARCHIVE) || true'
92
--- 149,155 ----
93
   dummy.o pseudo.o netmsg.o flstring.o fdstring.o \
94
   rfc822.o nntp.o smtp.o imap4r1.o pop3.o \
95
   unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o mix.o
96
! CFLAGS+=$(BASECFLAGS) $(EXTRACFLAGS)
97
  
98
  CAT=cat
99
  MAKE=make
100
***************
101
*** 232,237 ****
102
--- 232,246 ----
103
  	 BASECFLAGS="-g -B/usr/lib/big/ -Dvoid=char -Dconst=" \
104
  	 RANLIB=true ARRC="ar -rc"
105
  
106
+ bfp:	# FreeBSD Pluggable Authentication Modules
107
+ 	$(BUILD) `cat SPECIALS` OS=bsi SIGTYPE=psx CHECKPW=pam \
108
+ 	 SPOOLDIR=/var \
109
+ 	 ACTIVEFILE=/usr/local/news/lib/active \
110
+ 	 RSHPATH=/usr/bin/rsh \
111
+ 	 LOCKPGM=$(PREFIX)/libexec/mlock \
112
+ 	 BASECFLAGS="-DNFSKLUDGE" \
113
+ 	 BASELDFLAGS="-lpam -lcrypt"
114
+ 
115
  bs3:	# BSD/i386 3.0 or higher
116
  	$(BUILD) `$(CAT) SPECIALS` OS=bsi \
117
  	 CHECKPW=bsi LOGINPW=bsi CRXTYPE=nfs \
118
***************
119
*** 251,258 ****
120
  	 SPOOLDIR=/var \
121
  	 ACTIVEFILE=/usr/local/news/lib/active \
122
  	 RSHPATH=/usr/bin/rsh \
123
  	 BASECFLAGS="$(GCCCFLAGS)" \
124
! 	 BASELDFLAGS="-lcrypt"
125
  
126
  bsi:	# BSD/i386
127
  	$(BUILD) `$(CAT) SPECIALS` OS=$@ \
128
--- 260,268 ----
129
  	 SPOOLDIR=/var \
130
  	 ACTIVEFILE=/usr/local/news/lib/active \
131
  	 RSHPATH=/usr/bin/rsh \
132
+ 	 LOCKPGM=$(PREFIX)/libexec/mlock \
133
  	 BASECFLAGS="$(GCCCFLAGS)" \
134
! 	 BASELDFLAGS=""
135
  
136
  bsi:	# BSD/i386
137
  	$(BUILD) `$(CAT) SPECIALS` OS=$@ \
138
***************
139
*** 842,848 ****
140
  
141
  build:	clean once $(ARCHIVE)
142
  
143
! all:	$(ARCHIVE)
144
  
145
  $(ARCHIVE): $(BINARIES)
146
  	sh -c '$(RM) $(ARCHIVE) || true'
147
--- 852,858 ----
148
  
149
  build:	clean once $(ARCHIVE)
150
  
151
! all:	onceenv
152
  
153
  $(ARCHIVE): $(BINARIES)
154
  	sh -c '$(RM) $(ARCHIVE) || true'
(-)files/patch-ac (-73 / +85 lines)
Lines 1-73 Link Here
1
--- src/imapd/Makefile.orig	Tue Jun 29 21:26:28 2004
1
*** src/imapd/Makefile.orig	Thu Aug 31 02:10:44 2006
2
+++ src/imapd/Makefile	Fri Sep  3 21:23:29 2004
2
--- src/imapd/Makefile	Mon Jul 23 18:02:12 2007
3
@@ -18,11 +18,11 @@
3
***************
4
 # CPYRIGHT, included with this Distribution.
4
*** 25,35 ****
5
 
5
  # Last Edited:	30 August 2006
6
 
6
  
7
-ALERT=/etc/imapd.alert
7
  
8
+ALERT=$(PREFIX)/etc/imapd.alert
8
! ALERT=/etc/imapd.alert
9
 USERALERT=.imapalert
9
  USERALERT=.imapalert
10
-SHUTDOWN=/etc/nologin
10
! SHUTDOWN=/etc/nologin
11
-ANO=/etc/anonymous.newsgroups
11
! ANO=/etc/anonymous.newsgroups
12
-NNTP=/etc/imapd.nntp
12
! NNTP=/etc/imapd.nntp
13
+SHUTDOWN=$(PREFIX)/etc/nologin
13
  SHELL= /bin/sh
14
+ANO=$(PREFIX)/etc/anonymous.newsgroups
14
  
15
+NNTP=$(PREFIX)//etc/imapd.nntp
15
  
16
 SHELL= /bin/sh
16
--- 25,35 ----
17
 
17
  # Last Edited:	30 August 2006
18
 
18
  
19
@@ -30,7 +30,9 @@
19
  
20
 # causes the "Manage Mail" menu item to open the given URL, e.g. to point to
20
! ALERT=$(PREFIX)/etc/imapd.alert
21
 # an alternative IMAP client (e.g. Pine) or perhaps to a homebrew mail
21
  USERALERT=.imapalert
22
 # account management page.
22
! SHUTDOWN=$(PREFIX)/etc/nologin
23
-#NSBD= -DNETSCAPE_BRAIN_DAMAGE=\"http://www.washington.edu/pine\"
23
! ANO=$(PREFIX)/etc/anonymous.newsgroups
24
+.if defined(WITH_NETSCAPE_BRAIN_DAMAGE)
24
! NNTP=$(PREFIX)//etc/imapd.nntp
25
+NSBD= -DNETSCAPE_BRAIN_DAMAGE=\"http://www.washington.edu/pine\"
25
  SHELL= /bin/sh
26
+.endif
26
  
27
 
27
  
28
 
28
***************
29
 
29
*** 37,64 ****
30
@@ -39,28 +41,30 @@
30
  # causes the "Manage Mail" menu item to open the given URL, e.g. to point to
31
 # broken program does a STATUS on the selected mailbox.  This shouldn't be
31
  # an alternative IMAP client (e.g. Pine) or perhaps to a homebrew mail
32
 # necessary, and it's been reported that Entourage works without having to
32
  # account management page.
33
 # un-comment this.
33
! #NSBD= -DNETSCAPE_BRAIN_DAMAGE=\"http://www.washington.edu/pine\"
34
-#ENBD= -DENTOURAGE_BRAIN_DAMAGE
34
  
35
+.if defined(WITH_ENTOURAGE_BRAIN_DAMAGE)
35
  
36
+ENBD= -DENTOURAGE_BRAIN_DAMAGE
36
  # Get local definitions from c-client directory
37
+.endif
37
  
38
 
38
! C = ../c-client
39
 
39
! CCLIENTLIB = $C/c-client.a
40
 # Get local definitions from c-client directory
40
! CC = `cat $C/CCTYPE`
41
 
41
! CFLAGS = -I$C `cat $C/CFLAGS` $(NSBD) $(ENBD) -DANOFILE=\"$(ANO)\" \
42
 C = ../c-client
42
  	-DALERTFILE=\"$(ALERT)\" -DNNTPFILE=\"$(NNTP)\" \
43
-CCLIENTLIB = $C/c-client.a
43
  	-DUSERALERTFILE=\"$(USERALERT)\" -DSHUTDOWNFILE=\"$(SHUTDOWN)\"
44
-CC = `cat $C/CCTYPE`
44
! LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS`
45
-CFLAGS = -I$C `cat $C/CFLAGS` $(NSBD) $(ENBD) -DANOFILE=\"$(ANO)\" \
45
  
46
-	-DALERTFILE=\"$(ALERT)\" -DNNTPFILE=\"$(NNTP)\" \
46
  all:	imapd
47
-	-DUSERALERTFILE=\"$(USERALERT)\" -DSHUTDOWNFILE=\"$(SHUTDOWN)\"
47
  
48
-LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS`
48
! imapd: $(CCLIENTLIB) imapd.o
49
+#CCLIENTLIB = $C/c-client.a
49
  	$(CC) $(CFLAGS) -o imapd imapd.o $(LDFLAGS)
50
+CFLAGS+=	-DNFSKLUDGE -I$(LOCALBASE)/include/c-client \
50
- 
51
+		-DANOFILE=\"$(ANO)\" -DALERTFILE=\"$(ALERT)\" \
51
- imapd.o: $C/mail.h $C/misc.h $C/osdep.h
52
+		-DNNTPFILE=\"$(NNTP)\" -DUSERALERTFILE=\"$(USERALERT)\" \
52
- 
53
+		-DSHUTDOWNFILE=\"$(SHUTDOWN)\"
53
- $(CCLIENTLIB):
54
+LDFLAGS+=	$(EXTRALDFLAGS) -L$(LOCALBASE)/lib -lc-client4
54
- 	cd $C;make
55
+.if defined(WITH_DRAC)
55
  
56
+CFLAGS+=	-DETC_DIR=\"$(PREFIX)/etc\" -DDRAC_AUTH
56
  clean:
57
+LDFLAGS+=	-ldrac
57
  	rm -f *.o imapd || true
58
+.endif
58
--- 37,63 ----
59
+CFLAGS+= $(NSBD) $(ENBD)
59
  # causes the "Manage Mail" menu item to open the given URL, e.g. to point to
60
 
60
  # an alternative IMAP client (e.g. Pine) or perhaps to a homebrew mail
61
 all:	imapd
61
  # account management page.
62
 
62
! .if defined(WITH_NETSCAPE_BRAIN_DAMAGE)
63
-imapd: $(CCLIENTLIB) imapd.o
63
! NSBD= -DNETSCAPE_BRAIN_DAMAGE=\"http://www.washington.edu/pine\"
64
+imapd:	imapd.o
64
! .endif
65
 	$(CC) $(CFLAGS) -o imapd imapd.o $(LDFLAGS)
65
  
66
-
66
  
67
-imapd.o: $C/mail.h $C/misc.h $C/osdep.h
67
  # Get local definitions from c-client directory
68
-
68
  
69
-$(CCLIENTLIB):
69
! CFLAGS = -DNFSKLUDGE -I$(LOCALBASE)/include/c-client $(NSBD) \
70
-	cd $C;make
70
! 	-DANOFILE=\"$(ANO)\" \
71
 
71
  	-DALERTFILE=\"$(ALERT)\" -DNNTPFILE=\"$(NNTP)\" \
72
 clean:
72
  	-DUSERALERTFILE=\"$(USERALERT)\" -DSHUTDOWNFILE=\"$(SHUTDOWN)\"
73
 	rm -f *.o imapd || true
73
! LDFLAGS+=	$(EXTRALDFLAGS) -L$(LOCALBASE)/lib -lc-client4
74
! .if defined(WITH_DRAC)
75
! CFLAGS+=	-DETC_DIR=\"$(PREFIX)/etc\" -DDRAC_AUTH
76
! LDFLAGS+=	-ldrac
77
! .endif
78
  
79
  all:	imapd
80
  
81
! imapd: imapd.o
82
  	$(CC) $(CFLAGS) -o imapd imapd.o $(LDFLAGS)
83
  
84
  clean:
85
  	rm -f *.o imapd || true
(-)files/patch-ad (-70 / +110 lines)
Lines 1-70 Link Here
1
--- Makefile.orig	Tue Nov  5 01:19:13 2002
1
*** Makefile.orig	Wed May  9 00:50:45 2007
2
+++ Makefile	Thu Nov 28 00:11:51 2002
2
--- Makefile	Mon Jul 23 17:45:00 2007
3
@@ -148,7 +148,7 @@
3
***************
4
 # std	system standard (typically passwd file), determined by port
4
*** 164,170 ****
5
 # two	try alternative (defined by CHECKPWALT), then std
5
  # std	system standard (typically passwd file), determined by port
6
 
6
  # two	try alternative (defined by CHECKPWALT), then std
7
-PASSWDTYPE=std
7
  
8
+PASSWDTYPE=pam
8
! PASSWDTYPE=std
9
 
9
  
10
 
10
  
11
 # SSL type.  Defines whether or not SSL support is on this system
11
  # SSL type.  Defines whether or not SSL support is on this system
12
@@ -215,12 +215,12 @@
12
--- 164,170 ----
13
 #	gradually-increasing intervals, starting at 2800-2900, and becoming
13
  # std	system standard (typically passwd file), determined by port
14
 #	permanent at 48,300.
14
  # two	try alternative (defined by CHECKPWALT), then std
15
 
15
  
16
-EXTRACFLAGS=
16
! PASSWDTYPE=pam
17
+EXTRACFLAGS=-I$(PREFIX)/include/c-client
17
  
18
 
18
  
19
 
19
  # SSL type.  Defines whether or not SSL support is on this system
20
 # Extra linker flags (additional/alternative libraries, etc.)
20
***************
21
 
21
*** 253,264 ****
22
-EXTRALDFLAGS=
22
  #	British.  As of 2005, the Julian calendar and the Gregorian calendar
23
+EXTRALDFLAGS=-L$(PREFIX)/lib -lc-client4
23
  #	diverge by 15 days.
24
 
24
  
25
 
25
! EXTRACFLAGS=
26
 # Special make flags (e.g. to override make environment variables)
26
  
27
@@ -256,13 +256,7 @@
27
  
28
 
28
  # Extra linker flags (additional/alternative libraries, etc.)
29
 # Make the IMAP Toolkit
29
  
30
 
30
! EXTRALDFLAGS=
31
-all:	SPECIALS c-client rebuild bundled
31
  
32
-
32
  
33
-c-client:
33
  # Special make flags (e.g. to override make environment variables)
34
-	@echo Not processed yet.  In a first-time build, you must specify
34
--- 253,264 ----
35
-	@echo the system type so that the sources are properly processed.
35
  #	British.  As of 2005, the Julian calendar and the Gregorian calendar
36
-	@false
36
  #	diverge by 15 days.
37
-
37
  
38
+all:	bundled
38
! EXTRACFLAGS=-I$(PREFIX)/include/c-client
39
 
39
  
40
 SPECIALS:
40
  
41
 	echo $(SPECIALS) > SPECIALS
41
  # Extra linker flags (additional/alternative libraries, etc.)
42
@@ -396,9 +390,6 @@
42
  
43
 	@echo + In order to rectify this problem, you MUST build with:
43
! EXTRALDFLAGS=-L$(PREFIX)/lib -lc-client4
44
 	@echo ++ SSLTYPE=$(SSLTYPE).nopwd
44
  
45
 	@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
45
  
46
-	@echo
46
  # Special make flags (e.g. to override make environment variables)
47
-	@echo Do you want to continue this build anyway?  Type y or n please:
47
***************
48
-	@$(SH) -c 'read x; case "$$x" in y) exit 0;; *) exit 1;; esac'
48
*** 294,306 ****
49
 
49
  
50
 sslnone:
50
  # Make the IMAP Toolkit
51
 	@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
51
  
52
@@ -411,9 +402,6 @@
52
! all:	c-client SPECIALS rebuild bundled
53
 	@echo ++ SSLTYPE=nopwd
53
! 
54
 	@echo + You must also have OpenSSL or equivalent installed.
54
! c-client:
55
 	@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
55
! 	@echo Not processed yet.  In a first-time build, you must specify
56
-	@echo
56
! 	@echo the system type so that the sources are properly processed.
57
-	@echo Do you want to continue this build anyway?  Type y or n please:
57
! 	@false
58
-	@$(SH) -c 'read x; case "$$x" in y) exit 0;; *) exit 1;; esac'
58
! 
59
 
59
  
60
 
60
  SPECIALS:
61
 # C compiler types
61
  	echo $(SPECIALS) > SPECIALS
62
@@ -434,7 +422,7 @@
62
--- 294,300 ----
63
 	$(TOOLS)/$@ "$(LN)" src/tmail tmail
63
  
64
 	$(LN) $(TOOLS)/$@ .
64
  # Make the IMAP Toolkit
65
 
65
  
66
-build:	OSTYPE rebuild rebuildclean bundled
66
! all:	bundled
67
+build:	bundled
67
  
68
 
68
  SPECIALS:
69
 OSTYPE:
69
  	echo $(SPECIALS) > SPECIALS
70
 	@echo Building c-client for $(BUILDTYPE)...
70
***************
71
*** 559,567 ****
72
  	@echo + In order to rectify this problem, you MUST build with:
73
  	@echo ++ SSLTYPE=$(SSLTYPE).nopwd
74
  	@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
75
- 	@echo
76
- 	@echo Do you want to continue this build anyway?  Type y or n please:
77
- 	@$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make nounenc;exit 1);; esac'
78
  
79
  nounenc:
80
  	@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
81
--- 553,558 ----
82
***************
83
*** 582,590 ****
84
  	@echo ++ SSLTYPE=nopwd
85
  	@echo + You must also have OpenSSL or equivalent installed.
86
  	@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
87
- 	@echo
88
- 	@echo Do you want to continue this build anyway?  Type y or n please:
89
- 	@$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make nonossl;exit 1);; esac'
90
  
91
  nonossl:
92
  	@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
93
--- 573,578 ----
94
***************
95
*** 659,665 ****
96
  	$(TOOLS)/$@ "$(LN)" src/tmail tmail
97
  	$(LN) $(TOOLS)/$@ .
98
  
99
! build:	OSTYPE rebuild rebuildclean bundled
100
  
101
  OSTYPE:
102
  	@$(MAKE) ip$(IP)
103
--- 647,653 ----
104
  	$(TOOLS)/$@ "$(LN)" src/tmail tmail
105
  	$(LN) $(TOOLS)/$@ .
106
  
107
! build:	bundled
108
  
109
  OSTYPE:
110
  	@$(MAKE) ip$(IP)
(-)files/patch-ah (-131 / +173 lines)
Lines 1-131 Link Here
1
--- src/ipopd/ipop3d.c.orig	Tue Jun 22 00:58:07 2004
1
*** src/ipopd/ipop3d.c.orig	Tue May 22 01:23:47 2007
2
+++ src/ipopd/ipop3d.c	Fri Sep  3 20:57:24 2004
2
--- src/ipopd/ipop3d.c	Mon Jul 23 17:46:53 2007
3
@@ -28,6 +28,11 @@
3
***************
4
 #include <time.h>
4
*** 36,41 ****
5
 #include "c-client.h"
5
--- 36,46 ----
6
 
6
  #include <time.h>
7
+#ifdef DRAC_AUTH
7
  #include "c-client.h"
8
+#include <netinet/in.h>
8
  
9
+#include <arpa/inet.h>
9
+ #ifdef DRAC_AUTH
10
+#include <stdlib.h>
10
+ #include <netinet/in.h>
11
+#endif /* DRAC_AUTH */
11
+ #include <arpa/inet.h>
12
 
12
+ #include <stdlib.h>
13
 #define CRLF PSOUT ("\015\012")	/* primary output terpri */
13
+ #endif /* DRAC_AUTH */
14
 
14
  
15
@@ -57,6 +62,12 @@
15
  #define CRLF PSOUT ("\015\012")	/* primary output terpri */
16
 
16
  
17
 /* Global storage */
17
***************
18
 
18
*** 65,70 ****
19
+#ifdef DRAC_AUTH
19
--- 70,81 ----
20
+#define DRACTIMEOUT 10*60     /* check every 10 minutes */
20
  
21
+time_t lastdrac = 0;          /* time of last drac check */
21
  /* Global storage */
22
+extern char *getenv ();
22
  
23
+#endif /* DRAC_AUTH */
23
+ #ifdef DRAC_AUTH
24
+
24
+ #define DRACTIMEOUT 10*60     /* check every 10 minutes */
25
 char *version = "2004.89";	/* server version */
25
+ time_t lastdrac = 0;          /* time of last drac check */
26
 short state = AUTHORIZATION;	/* server state */
26
+ extern char *getenv ();
27
 short critical = NIL;		/* non-zero if in critical code */
27
+ #endif /* DRAC_AUTH */
28
@@ -89,7 +100,53 @@
28
+ 
29
 int mbxopen (char *mailbox);
29
  char *version = "98";		/* edit number of this server */
30
 long blat (char *text,long lines,unsigned long size);
30
  short state = AUTHORIZATION;	/* server state */
31
 void rset ();
31
  short critical = NIL;		/* non-zero if in critical code */
32
-
32
***************
33
+#ifdef DRAC_AUTH
33
*** 98,104 ****
34
+void drac_auth();
34
  int mbxopen (char *mailbox);
35
+#endif /* DRAC_AUTH */
35
  long blat (char *text,long lines,unsigned long size,STRING *st);
36
+
36
  void rset ();
37
+#ifdef DRAC_AUTH
37
! 
38
+/* DRAC Authorization
38
  /* Main program */
39
+ */
39
  
40
+void drac_auth ()
40
  int main (int argc,char *argv[])
41
+{
41
--- 109,161 ----
42
+  if (time (0) > lastdrac + DRACTIMEOUT)
42
  int mbxopen (char *mailbox);
43
+  {
43
  long blat (char *text,long lines,unsigned long size,STRING *st);
44
+	  FILE *dracconf;
44
  void rset ();
45
+	  char host[100];
45
! #ifdef DRAC_AUTH
46
+	  char *drachost;
46
! void drac_auth();
47
+	  char *err;
47
! #endif /* DRAC_AUTH */
48
+	  char *p;
48
! 
49
+
49
! #ifdef DRAC_AUTH
50
+	  if ( (dracconf = fopen(ETC_DIR "/dracd.host", "r")) == NULL)
50
! /* DRAC Authorization
51
+	  {
51
!  */
52
+		syslog (LOG_INFO, "dracd: error opening %s/dracd.host config file",ETC_DIR);
52
! void drac_auth ()
53
+		exit(1);
53
! {
54
+	  }
54
!   if (time (0) > lastdrac + DRACTIMEOUT)
55
+
55
!   {
56
+	  fgets(host, 100, dracconf);
56
! 	  FILE *dracconf;
57
+	  p = strchr(host, '\n');
57
! 	  char host[100];
58
+	  if(p != NULL)
58
! 	  char *drachost;
59
+		*p = '\0';
59
! 	  char *err;
60
+	  fclose(dracconf);
60
! 	  char *p;
61
+
61
! 
62
+	  if( drachost = (host) )
62
! 	  if ( (dracconf = fopen(ETC_DIR "/dracd.host", "r")) == NULL)
63
+	  {
63
! 	  {
64
+		  struct sockaddr_in sin;
64
! 		syslog (LOG_INFO, "dracd: error opening %s/dracd.host config file",ETC_DIR);
65
+		  int sinlen = sizeof (struct sockaddr_in);
65
! 		exit(1);
66
+		  char *client = getpeername (0,(struct sockaddr *) &sin,(void *) &sinlen) ?
66
! 	  }
67
+			"UNKNOWN" : inet_ntoa (sin.sin_addr);
67
! 
68
+
68
! 	  fgets(host, 100, dracconf);
69
+		  lastdrac = time(0);
69
! 	  p = strchr(host, '\n');
70
+
70
! 	  if(p != NULL)
71
+		  if (dracauth(drachost, inet_addr(client), &err) != 0)
71
! 		*p = '\0';
72
+			  syslog (LOG_INFO, err);
72
! 	  fclose(dracconf);
73
+		  else
73
! 
74
+			  syslog (LOG_INFO, "dracd: authorized ip %s", client);
74
! 	  if( drachost = (host) )
75
+	  }
75
! 	  {
76
+  }
76
! 		  struct sockaddr_in sin;
77
+}
77
! 		  int sinlen = sizeof (struct sockaddr_in);
78
+#endif /* DRAC_AUTH */
78
! 		  char *client = getpeername (0,(struct sockaddr *) &sin,(void *) &sinlen) ?
79
+
79
! 			"UNKNOWN" : inet_ntoa (sin.sin_addr);
80
 /* Main program */
80
! 
81
 
81
! 		  lastdrac = time(0);
82
 int main (int argc,char *argv[])
82
! 
83
@@ -102,7 +159,7 @@
83
! 		  if (dracauth(drachost, inet_addr(client), &err) != 0)
84
     (((s = strrchr (argv[0],'/')) || (s = strrchr (argv[0],'\\'))) ?
84
! 			  syslog (LOG_INFO, err);
85
      s+1 : argv[0]) : "ipop3d";
85
! 		  else
86
 				/* set service name before linkage */
86
! 			  syslog (LOG_INFO, "dracd: authorized ip %s", client);
87
-  mail_parameters (NIL,SET_SERVICENAME,(void *) "pop");
87
! 	  }
88
+  mail_parameters (NIL,SET_SERVICENAME,(void *) "pop3");
88
!   }
89
 #include "linkage.c"
89
! }
90
 				/* initialize server */
90
! #endif /* DRAC_AUTH */
91
   server_init (pgmname,"pop3","pop3s",clkint,kodint,hupint,trmint);
91
! 
92
@@ -205,9 +262,13 @@
92
  /* Main program */
93
 	      syslog (LOG_INFO,"AUTHENTICATE %s failure host=%.80s",s,
93
  
94
 		      tcp_clienthost ());
94
  int main (int argc,char *argv[])
95
 	    }
95
***************
96
-	    else if ((state = mbxopen ("INBOX")) == TRANSACTION)
96
*** 111,117 ****
97
+	    else if ((state = mbxopen ("INBOX")) == TRANSACTION) {
97
      (((s = strrchr (argv[0],'/')) || (s = strrchr (argv[0],'\\'))) ?
98
+		#ifdef DRAC_AUTH
98
       s+1 : argv[0]) : "ipop3d";
99
+		drac_auth();
99
  				/* set service name before linkage */
100
+		#endif /* DRAC_AUTH */
100
!   mail_parameters (NIL,SET_SERVICENAME,(void *) "pop");
101
 	      syslog (LOG_INFO,"Auth user=%.80s host=%.80s nmsgs=%ld/%ld",
101
  #include "linkage.c"
102
 		      user,tcp_clienthost (),nmsgs,stream->nmsgs);
102
  				/* initialize server */
103
+		}
103
    server_init (pgmname,"pop3","pop3s",clkint,kodint,hupint,trmint);
104
 	    else syslog (LOG_INFO,"Auth user=%.80s host=%.80s no mailbox",
104
--- 168,174 ----
105
 			 user,tcp_clienthost ());
105
      (((s = strrchr (argv[0],'/')) || (s = strrchr (argv[0],'\\'))) ?
106
 	  }
106
       s+1 : argv[0]) : "ipop3d";
107
@@ -235,9 +296,13 @@
107
  				/* set service name before linkage */
108
 	      PSOUT ("-ERR Missing APOP argument\015\012");
108
!   mail_parameters (NIL,SET_SERVICENAME,(void *) "pop3");
109
 	    else if (!(user = apop_login (challenge,s,t,argc,argv)))
109
  #include "linkage.c"
110
 	      PSOUT ("-ERR Bad APOP\015\012");
110
  				/* initialize server */
111
-	    else if ((state = mbxopen ("INBOX")) == TRANSACTION)
111
    server_init (pgmname,"pop3","pop3s",clkint,kodint,hupint,trmint);
112
+	    else if ((state = mbxopen ("INBOX")) == TRANSACTION) {
112
***************
113
+		#ifdef DRAC_AUTH
113
*** 215,223 ****
114
+		drac_auth();
114
  	      syslog (LOG_INFO,"AUTHENTICATE %s failure host=%.80s",s,
115
+		#endif /* DRAC_AUTH */
115
  		      tcp_clienthost ());
116
 	      syslog (LOG_INFO,"APOP user=%.80s host=%.80s nmsgs=%ld/%ld",
116
  	    }
117
 		      user,tcp_clienthost (),nmsgs,stream->nmsgs);
117
! 	    else if ((state = mbxopen ("INBOX")) == TRANSACTION)
118
+		}
118
  	      syslog (LOG_INFO,"Auth user=%.80s host=%.80s nmsgs=%ld/%ld",
119
 	    else syslog (LOG_INFO,"APOP user=%.80s host=%.80s no mailbox",
119
  		      user,tcp_clienthost (),nmsgs,stream->nmsgs);
120
 			 user,tcp_clienthost ());
120
  	    else syslog (LOG_INFO,"Auth user=%.80s host=%.80s no mailbox",
121
 	  }
121
  			 user,tcp_clienthost ());
122
@@ -575,6 +640,9 @@
122
  	  }
123
 				/* attempt the login */
123
--- 272,284 ----
124
     if (server_login (user,pass,t,argc,argv)) {
124
  	      syslog (LOG_INFO,"AUTHENTICATE %s failure host=%.80s",s,
125
       int ret = mbxopen ("INBOX");
125
  		      tcp_clienthost ());
126
+	#ifdef DRAC_AUTH
126
  	    }
127
+	drac_auth();
127
! 	    else if ((state = mbxopen ("INBOX")) == TRANSACTION) {
128
+	#endif /* DRAC_AUTH */
128
! 		#ifdef DRAC_AUTH
129
       if (ret == TRANSACTION)	/* mailbox opened OK? */
129
! 		drac_auth();
130
 	syslog (LOG_INFO,"%sLogin user=%.80s host=%.80s nmsgs=%ld/%ld",
130
! 		#endif /* DRAC_AUTH */
131
 		t ? "Admin " : "",user,tcp_clienthost (),nmsgs,stream->nmsgs);
131
  	      syslog (LOG_INFO,"Auth user=%.80s host=%.80s nmsgs=%ld/%ld",
132
  		      user,tcp_clienthost (),nmsgs,stream->nmsgs);
133
+ 		}
134
  	    else syslog (LOG_INFO,"Auth user=%.80s host=%.80s no mailbox",
135
  			 user,tcp_clienthost ());
136
  	  }
137
***************
138
*** 247,255 ****
139
  	      PSOUT ("-ERR Missing APOP argument\015\012");
140
  	    else if (!(user = apop_login (challenge,s,t,argc,argv)))
141
  	      PSOUT ("-ERR Bad APOP\015\012");
142
! 	    else if ((state = mbxopen ("INBOX")) == TRANSACTION)
143
  	      syslog (LOG_INFO,"APOP user=%.80s host=%.80s nmsgs=%ld/%ld",
144
  		      user,tcp_clienthost (),nmsgs,stream->nmsgs);
145
  	    else syslog (LOG_INFO,"APOP user=%.80s host=%.80s no mailbox",
146
  			 user,tcp_clienthost ());
147
  	  }
148
--- 308,320 ----
149
  	      PSOUT ("-ERR Missing APOP argument\015\012");
150
  	    else if (!(user = apop_login (challenge,s,t,argc,argv)))
151
  	      PSOUT ("-ERR Bad APOP\015\012");
152
! 	    else if ((state = mbxopen ("INBOX")) == TRANSACTION) {
153
! 		#ifdef DRAC_AUTH
154
! 		drac_auth();
155
! 		#endif /* DRAC_AUTH */
156
  	      syslog (LOG_INFO,"APOP user=%.80s host=%.80s nmsgs=%ld/%ld",
157
  		      user,tcp_clienthost (),nmsgs,stream->nmsgs);
158
+ 		}
159
  	    else syslog (LOG_INFO,"APOP user=%.80s host=%.80s no mailbox",
160
  			 user,tcp_clienthost ());
161
  	  }
162
***************
163
*** 609,614 ****
164
--- 674,682 ----
165
  				/* attempt the login */
166
      if (server_login (user,pass,t,argc,argv)) {
167
        int ret = mbxopen ("INBOX");
168
+ 	#ifdef DRAC_AUTH
169
+ 	drac_auth();
170
+ 	#endif /* DRAC_AUTH */
171
        if (ret == TRANSACTION)	/* mailbox opened OK? */
172
  	syslog (LOG_INFO,"%sLogin user=%.80s host=%.80s nmsgs=%ld/%ld",
173
  		t ? "Admin " : "",user,tcp_clienthost (),nmsgs,stream->nmsgs);
(-)files/patch-ai (-89 / +103 lines)
Lines 1-89 Link Here
1
--- src/imapd/imapd.c.orig	Tue Jun 29 21:56:17 2004
1
*** src/imapd/imapd.c.orig	Wed Jul 11 22:08:16 2007
2
+++ src/imapd/imapd.c	Fri Sep  3 20:59:40 2004
2
--- src/imapd/imapd.c	Mon Jul 23 17:48:56 2007
3
@@ -29,6 +29,11 @@
3
***************
4
 #include "c-client.h"
4
*** 38,43 ****
5
 #include <sys/stat.h>
5
--- 38,48 ----
6
 
6
  #include "newsrc.h"
7
+#ifdef DRAC_AUTH
7
  #include <sys/stat.h>
8
+#include <netinet/in.h>
8
  
9
+#include <arpa/inet.h>
9
+ #ifdef DRAC_AUTH
10
+#include <stdlib.h>
10
+ #include <netinet/in.h>
11
+#endif /* DRAC_AUTH */
11
+ #include <arpa/inet.h>
12
 
12
+ #include <stdlib.h>
13
 #define CRLF PSOUT ("\015\012")	/* primary output terpri */
13
+ #endif /* DRAC_AUTH */
14
 
14
  
15
@@ -183,6 +188,12 @@
15
  #define CRLF PSOUT ("\015\012")	/* primary output terpri */
16
 
16
  
17
 /* Global storage */
17
***************
18
 
18
*** 203,208 ****
19
+#ifdef DRAC_AUTH
19
--- 208,219 ----
20
+#define DRACTIMEOUT 10*60     /* check every 10 minutes */
20
  
21
+time_t lastdrac = 0;          /* time of last drac check */
21
  /* Global storage */
22
+extern char *getenv ();
22
  
23
+#endif /* DRAC_AUTH */
23
+ #ifdef DRAC_AUTH
24
+
24
+ #define DRACTIMEOUT 10*60     /* check every 10 minutes */
25
 char *version = "2004.357";	/* version number of this server */
25
+ time_t lastdrac = 0;          /* time of last drac check */
26
 time_t alerttime = 0;		/* time of last alert */
26
+ extern char *getenv ();
27
 time_t sysalerttime = 0;	/* time of last system alert */
27
+ #endif /* DRAC_AUTH */
28
@@ -246,7 +257,50 @@
28
+ 
29
   msg_string_next,		/* get next byte in string structure */
29
  char *version = "389";		/* edit number of this server */
30
   msg_string_setpos		/* set position in string structure */
30
  char *logout = "Logout";	/* syslogreason for logout */
31
 };
31
  char *goodbye = NIL;		/* bye reason */
32
-
32
***************
33
+
33
*** 277,283 ****
34
+#ifdef DRAC_AUTH
34
    msg_string_next,		/* get next byte in string structure */
35
+/* DRAC Authorization
35
    msg_string_setpos		/* set position in string structure */
36
+ */
36
  };
37
+void drac_auth ()
37
! 
38
+{
38
  /* Main program */
39
+  if (time (0) > lastdrac + DRACTIMEOUT)
39
  
40
+  {
40
  int main (int argc,char *argv[])
41
+	  FILE *dracconf;
41
--- 288,337 ----
42
+	  char host[100];
42
    msg_string_next,		/* get next byte in string structure */
43
+	  char *drachost;
43
    msg_string_setpos		/* set position in string structure */
44
+	  char *err;
44
  };
45
+	  char *p;
45
! 
46
+
46
! #ifdef DRAC_AUTH
47
+	  if ( (dracconf = fopen(ETC_DIR "/dracd.host", "r")) == NULL)
47
! /* DRAC Authorization
48
+	  {
48
!  */
49
+		syslog (LOG_INFO, "dracd: error opening %s/dracd.host config file",ETC_DIR);
49
! void drac_auth ()
50
+		exit(1);
50
! {
51
+	  }
51
!   if (time (0) > lastdrac + DRACTIMEOUT)
52
+
52
!   {
53
+	  fgets(host, 100, dracconf);
53
! 	  FILE *dracconf;
54
+	  p = strchr(host, '\n');
54
! 	  char host[100];
55
+	  if(p != NULL)
55
! 	  char *drachost;
56
+		*p = '\0';
56
! 	  char *err;
57
+	  fclose(dracconf);
57
! 	  char *p;
58
+
58
! 
59
+	  if( drachost = (host) )
59
! 	  if ( (dracconf = fopen(ETC_DIR "/dracd.host", "r")) == NULL)
60
+	  {
60
! 	  {
61
+		  struct sockaddr_in sin;
61
! 		syslog (LOG_INFO, "dracd: error opening %s/dracd.host config file",ETC_DIR);
62
+		  int sinlen = sizeof (struct sockaddr_in);
62
! 		exit(1);
63
+		  char *client = getpeername (0,(struct sockaddr *) &sin,(void *) &sinlen) ?
63
! 	  }
64
+			"UNKNOWN" : inet_ntoa (sin.sin_addr);
64
! 
65
+
65
! 	  fgets(host, 100, dracconf);
66
+		  lastdrac = time(0);
66
! 	  p = strchr(host, '\n');
67
+
67
! 	  if(p != NULL)
68
+		  if (dracauth(drachost, inet_addr(client), &err) != 0)
68
! 		*p = '\0';
69
+			  syslog (LOG_INFO, err);
69
! 	  fclose(dracconf);
70
+		  else
70
! 
71
+			  syslog (LOG_INFO, "dracd: authorized ip %s", client);
71
! 	  if( drachost = (host) )
72
+	  }
72
! 	  {
73
+  }
73
! 		  struct sockaddr_in sin;
74
+}
74
! 		  int sinlen = sizeof (struct sockaddr_in);
75
+#endif /* DRAC_AUTH */
75
! 		  char *client = getpeername (0,(struct sockaddr *) &sin,(void *) &sinlen) ?
76
+
76
! 			"UNKNOWN" : inet_ntoa (sin.sin_addr);
77
 /* Main program */
77
! 
78
 
78
! 		  lastdrac = time(0);
79
 int main (int argc,char *argv[])
79
! 
80
@@ -1251,6 +1305,9 @@
80
! 		  if (dracauth(drachost, inet_addr(client), &err) != 0)
81
 	      lasterror ());
81
! 			  syslog (LOG_INFO, err);
82
       return;
82
! 		  else
83
     }
83
! 			  syslog (LOG_INFO, "dracd: authorized ip %s", client);
84
+	#ifdef DRAC_AUTH
84
! 	  }
85
+	drac_auth();
85
!   }
86
+	#endif /* DRAC_AUTH */
86
! }
87
 				/* change in number of messages? */
87
! #endif /* DRAC_AUTH */
88
     if (existsquelled || (nmsgs != stream->nmsgs)) {
88
! 
89
       PSOUT ("* ");
89
  /* Main program */
90
  
91
  int main (int argc,char *argv[])
92
***************
93
*** 1501,1506 ****
94
--- 1555,1563 ----
95
  	      lasterror ());
96
        return;
97
      }
98
+ 	#ifdef DRAC_AUTH
99
+ 	drac_auth();
100
+ 	#endif /* DRAC_AUTH */
101
  				/* change in number of messages? */
102
      if (existsquelled || (nmsgs != stream->nmsgs)) {
103
        PSOUT ("* ");
(-)files/patch-src-osdep-unix-env_unix.c (-11 / +19 lines)
Lines 1-11 Link Here
1
--- src/osdep/unix/env_unix.c.orig	Mon Sep 13 23:31:19 2004
1
*** src/osdep/unix/env_unix.c.orig	Tue May 29 22:29:52 2007
2
+++ src/osdep/unix/env_unix.c	Fri Nov 25 20:44:01 2005
2
--- src/osdep/unix/env_unix.c	Mon Jul 23 17:50:43 2007
3
@@ -44,7 +44,7 @@
3
***************
4
 static short anonymous = NIL;	/* is anonymous */
4
*** 79,85 ****
5
 static short blackBox = NIL;	/* is a black box */
5
  static short anonymous = NIL;	/* is anonymous */
6
 static short closedBox = NIL;	/* is a closed box */
6
  static short blackBox = NIL;	/* is a black box */
7
-static short restrictBox = NIL;	/* is a restricted box */
7
  static short closedBox = NIL;	/* is a closed box (uses chroot() jail) */
8
+static short restrictBox = -1;	/* is a restricted box */
8
! static short restrictBox = NIL;	/* is a restricted box */
9
 static short has_no_life = NIL;	/* is a cretin with no life */
9
  static short has_no_life = NIL;	/* is a cretin with no life */
10
 				/* flock() emulator is a no-op */
10
  static short hideDotFiles = NIL;/* hide files whose names start with . */
11
 static short disableFcntlLock = NIL;
11
  				/* advertise filesystem root */
12
--- 79,85 ----
13
  static short anonymous = NIL;	/* is anonymous */
14
  static short blackBox = NIL;	/* is a black box */
15
  static short closedBox = NIL;	/* is a closed box (uses chroot() jail) */
16
! static short restrictBox = -1;	/* is a restricted box */
17
  static short has_no_life = NIL;	/* is a cretin with no life */
18
  static short hideDotFiles = NIL;/* hide files whose names start with . */
19
  				/* advertise filesystem root */

Return to bug 114834