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

(-)./GIDs (+1 lines)
Line 0 Link Here
1
daemon:*:1:
(-)./Makefile (-21 / +31 lines)
Lines 13-19 Link Here
13
COMMENT=	Berkeley POP 3 server (now maintained by Qualcomm)
13
COMMENT=	Berkeley POP 3 server (now maintained by Qualcomm)
14
USE_AUTOTOOLS=	autoconf
14
USE_AUTOTOOLS=	autoconf
15
USE_OPENSSL=	yes
16
CONFIGURE_ENV=	LIBS="-lcrypt -lmd -lutil -L${LOCALBASE}/lib" \
15
CONFIGURE_ENV=	LIBS="-lcrypt -lmd -lutil -L${LOCALBASE}/lib" \
17
		OS_DEFS="-DSETPROCTITLE ${OS_DEFS}"
16
		OS_DEFS="-DSETPROCTITLE ${OS_DEFS}"
18
CONFIGURE_ARGS=	--enable-nonauth-file=${POPUSERS_FILE} \
17
CONFIGURE_ARGS=	--enable-nonauth-file=${POPUSERS_FILE} \
Lines 21-28 Link Here
21
		--enable-keep-temp-drop
20
		--enable-keep-temp-drop
22
PLIST_SUB=	EPOPPASSD=${EPOPPASSD} \
21
PLIST_SUB=	EPOPPASSD=${EPOPPASSD} \
23
		POP_USER=${POP_USER} \
22
		USERS=${USERS} \
24
		POP_GROUP=${POP_GROUP} \
23
		GROUPS=${GROUPS} \
25
		POP_MODE_DIR=${POP_MODE_DIR} \
24
		POP_MODE_DIR=${POP_MODE_DIR} \
26
		POP_MODE_CONF=${POP_MODE_CONF} \
25
		POP_MODE_CONF=${POP_MODE_CONF} \
27
		QPOPAUTH=${QPOPAUTH}
26
		QPOPAUTH=${QPOPAUTH}
Lines 32-44 Link Here
32
SUB_FILES=	pkg-message
31
SUB_FILES=	pkg-message
33
# internal configuration
32
# internal configuration
34
POP_USER=	pop
33
USERS?=		pop
35
POP_GROUP=	daemon
34
GROUPS?=	daemon
35
GID_FILES+=	../../GIDs ${.CURDIR}/GIDs
36
POP_MODE_DIR=	0711
36
POP_MODE_DIR=	0711
37
POP_MODE_CONF=	0444
37
POP_MODE_CONF=	0444
38
POPUSERS_FILE=	${ETCDIR}/popusers
38
POPUSERS_FILE=	${ETCDIR}/popusers
39
SAMPLE_EXT=	.sample
39
SAMPLE_EXT=	.sample
40
#
40
41
PKGDEINSTALL=	${PKGINSTALL}
41
PKGDEINSTALL=	${PKGINSTALL}
42
OPTIONS_DEFINE=	APOP_ONLY APOP DOCUMENTATION DRAC FULL_POPD_DEBUG PAM \
42
OPTIONS_DEFINE=	APOP_ONLY APOP DOCUMENTATION DRAC FULL_POPD_DEBUG PAM \
Lines 68-74 Link Here
68
QPOPAUTH=	"@comment "
68
QPOPAUTH=	"@comment "
69
.else
69
.else
70
CONFIGURE_ARGS+=	--enable-apop=${ETCDIR}/pop.auth \
70
CONFIGURE_ARGS+=	--enable-apop=${ETCDIR}/pop.auth \
71
			--with-apopuid=pop
71
			--with-popuid=${USERS}
72
MAN8+=		qpopauth.8
72
MAN8+=		qpopauth.8
73
QPOPAUTH=	""
73
QPOPAUTH=	""
74
# If WITH_APOP_ONLY variable present in the environment, qpopper builds
74
# If WITH_APOP_ONLY variable present in the environment, qpopper builds
Lines 81-87 Link Here
81
# Do not install documentation since it is in pdf format and normally
81
# Do not install documentation since it is in pdf format and normally
82
# not used unless user wants it.
82
# not used unless user wants it.
83
.if empty(PORT_OPTIONS:MDOCUMENTATION)
83
.if empty(PORT_OPTIONS:MDOCUMENTATION)
84
NOPORTDOCS=	yes
84
OPTIONS_UNSET+=	DOCS
85
.endif
85
.endif
86
# If WITH_DRAC variable present in the environment, qpopper builds
86
# If WITH_DRAC variable present in the environment, qpopper builds
Lines 128-133 Link Here
128
# The default is to build without SSL/TLS support.
128
# The default is to build without SSL/TLS support.
129
.if ${PORT_OPTIONS:MSSL}
129
.if ${PORT_OPTIONS:MSSL}
130
USE_OPENSSL=	yes
130
CONFIGURE_ARGS+=	--with-openssl=${OPENSSLBASE}
131
CONFIGURE_ARGS+=	--with-openssl=${OPENSSLBASE}
131
.endif
132
.endif
Lines 139-149 Link Here
139
	@${REINPLACE_CMD} -e \
140
	@${REINPLACE_CMD} -e \
140
		's|\$${sbindir}/sendmail|${LOCALBASE}/sbin/sendmail|g' \
141
		's|\$${sbindir}/sendmail|${LOCALBASE}/sbin/sendmail|g' \
141
		${WRKSRC}/configure.in
142
		${WRKSRC}/configure.in
142
.if defined(WITH_POPPASSD)
143
.if ${PORT_OPTIONS:MPOPPASSD}
143
	@${REINPLACE_CMD} -e 's|/usr/bin/smbpasswd|${LOCALBASE}/bin/smbpasswd|' \
144
	@${REINPLACE_CMD} -e 's|/usr/bin/smbpasswd|${LOCALBASE}/bin/smbpasswd|' \
144
		${WRKSRC}/password/poppassd.c
145
		${WRKSRC}/password/poppassd.c
145
.endif
146
.endif
146
.if defined(WITHOUT_U_OPTION)
147
.if empty(PORT_OPTIONS:MU_OPTION)
147
	@${REINPLACE_CMD} -E -e 's|(getopt \(.+)u|\1|' \
148
	@${REINPLACE_CMD} -E -e 's|(getopt \(.+)u|\1|' \
148
		${WRKSRC}/popper/main.c
149
		${WRKSRC}/popper/main.c
149
.endif
150
.endif
Lines 152-164 Link Here
152
	@(cd ${WRKSRC}; ${CHMOD} u+w configure*)
153
	@(cd ${WRKSRC}; ${CHMOD} u+w configure*)
153
do-install:
154
do-install:
154
.if !defined(WITHOUT_APOP)
155
.if ${PORT_OPTIONS:MAPOP}
155
	@${INSTALL_PROGRAM} ${WRKSRC}/popper/popauth ${PREFIX}/bin/qpopauth
156
	@${INSTALL_PROGRAM} ${WRKSRC}/popper/popauth ${PREFIX}/bin/qpopauth
156
# If WITHOUT_QPOPAUTH_SETUID variable present in the environment,
157
# If WITHOUT_QPOPAUTH_SETUID variable present in the environment,
157
# qpopper does not install qpopauth setuid to pop user so that
158
# qpopper does not install qpopauth setuid to pop user so that
158
# anyone can access the pop.auth database.
159
# anyone can access the pop.auth database.
159
.if !defined(WITHOUT_QPOPAUTH_SETUID)
160
.if ${PORT_OPTIONS:MQPOPAUTH_SETUID}
160
	@${CHOWN} pop ${PREFIX}/bin/qpopauth
161
	@${CHOWN} ${USERS} ${PREFIX}/bin/qpopauth
161
	@${CHMOD} u+s ${PREFIX}/bin/qpopauth
162
	@${CHMOD} u+s ${PREFIX}/bin/qpopauth
162
.endif
163
.endif
163
	@${INSTALL_MAN} ${WRKSRC}/man/popauth.8 ${MANPREFIX}/man/man8/qpopauth.8
164
	@${INSTALL_MAN} ${WRKSRC}/man/popauth.8 ${MANPREFIX}/man/man8/qpopauth.8
Lines 166-200 Link Here
166
.endif
167
.endif
167
	@${INSTALL_PROGRAM} ${WRKSRC}/popper/popper ${PREFIX}/libexec/qpopper
168
	@${INSTALL_PROGRAM} ${WRKSRC}/popper/popper ${PREFIX}/libexec/qpopper
168
	@${INSTALL_MAN} ${WRKSRC}/man/popper.8 ${MANPREFIX}/man/man8/qpopper.8
169
	@${INSTALL_MAN} ${WRKSRC}/man/popper.8 ${MANPREFIX}/man/man8/qpopper.8
169
.if defined(WITH_POPPASSD)
170
.if ${PORT_OPTIONS:MPOPPASSD}
170
	@${INSTALL_PROGRAM} ${WRKSRC}/password/poppassd ${PREFIX}/libexec/qpoppassd
171
	@${INSTALL_PROGRAM} ${WRKSRC}/password/poppassd ${PREFIX}/libexec/qpoppassd
171
.endif
172
.endif
172
	@${INSTALL} -d -o ${POP_USER} -g ${POP_GROUP} -m ${POP_MODE_DIR} \
173
	@${INSTALL} -d -o ${USERS} -g ${GROUPS} -m ${POP_MODE_DIR} \
173
		${ETCDIR}
174
		${ETCDIR}
174
.if !defined(NOPORTDOCS)
175
.if ${PORT_OPTIONS:MDOCS}
175
	@${MKDIR} ${DOCSDIR}
176
	@${MKDIR} ${DOCSDIR}
176
	@${INSTALL_DATA} ${WRKSRC}/GUIDE.pdf ${DOCSDIR}
177
	@${INSTALL_DATA} ${WRKSRC}/GUIDE.pdf ${DOCSDIR}
177
.endif
178
.endif
178
post-install: install-conf-file
179
post-install: install-conf-file
179
	@${CAT} ${PKGMESSAGE}
180
	@${CAT} ${PKGMESSAGE}
181
.if ${PORT_OPTIONS:MPOPPASSD}
182
	@${ECHO_MSG}	""
183
	@${ECHO_MSG}	"==============================================================================="
184
	@${ECHO_MSG}	"It adds for myself"
185
	@${ECHO_MSG}	"/etc/devfs.conf:"
186
	@${ECHO_MSG}	"link	/dev/pts/0 pty0"
187
	@${ECHO_MSG}	"==============================================================================="
188
	@${ECHO_MSG}	""
189
.endif
180
# based on original from op port, written by Cyrille Lefevre
190
# based on original from op port, written by Cyrille Lefevre
181
# <clefevre@citeweb.net>.
191
# <clefevre@citeweb.net>.
182
install-conf-file:
192
install-conf-file:
183
	@if [ ! -f ${CONF_DIR}/${CONF_FILE}${SAMP_SUFX} ]; then \
193
	@if [ ! -f ${CONF_DIR}/${CONF_FILE}${SAMP_SUFX} ]; then \
184
		if [ -f /etc/ftpusers ] && [ -n "${WITH_SAMPLE_POPUSERS}" ]; then \
194
		if [ -f /etc/ftpusers ] && [ -n "${PORT_OPTIONS:MSAMPLE_POPUSERS}" ]; then \
185
			${INSTALL} -c -o ${POP_USER} -g ${POP_GROUP} -m ${POP_MODE_CONF} \
195
			${INSTALL} -c -o ${USERS} -g ${GROUPS} -m ${POP_MODE_CONF} \
186
				/etc/ftpusers ${POPUSERS_FILE}${SAMPLE_EXT} ; \
196
				/etc/ftpusers ${POPUSERS_FILE}${SAMPLE_EXT} ; \
187
		else \
197
		else \
188
			${CP} /dev/null ${POPUSERS_FILE}${SAMPLE_EXT} ; \
198
			${CP} /dev/null ${POPUSERS_FILE}${SAMPLE_EXT} ; \
189
			${CHOWN} ${POP_USER}:${POP_GROUP} ${POPUSERS_FILE}${SAMPLE_EXT} ; \
199
			${CHOWN} ${USERS}:${GROUPS} ${POPUSERS_FILE}${SAMPLE_EXT} ; \
190
			${CHMOD} ${POP_MODE_CONF} ${POPUSERS_FILE}${SAMPLE_EXT} ; \
200
			${CHMOD} ${POP_MODE_CONF} ${POPUSERS_FILE}${SAMPLE_EXT} ; \
191
		fi ; \
201
		fi ; \
192
	fi
202
	fi
193
	@${INSTALL} -c -m 0640 \
203
	@${INSTALL} -c -o ${USERS} -g ${GROUPS} -m 0640 \
194
		${WRKSRC}/samples/qpopper.config ${PREFIX}/etc/qpopper.config${SAMPLE_EXT}
204
		${WRKSRC}/samples/qpopper.config ${PREFIX}/etc/qpopper.config${SAMPLE_EXT}
195
	@${SETENV} PKG_PREFIX=${PREFIX} ${SH} \
205
	@${SETENV} PKG_PREFIX=${PREFIX} ${SH} \
196
		${PKGINSTALL} ${PKGNAME} POST-INSTALL
206
		${PKGINSTALL} ${PKGNAME} POST-INSTALL ${USERS} ${GROUPS}
197
.include <bsd.port.post.mk>
207
.include <bsd.port.post.mk>
(-)./files/extra-patch-password::auth_user.c (-10 lines)
Lines 1-10 Link Here
1
--- password/auth_user.c.orig	Fri Mar 14 00:39:42 2003
2
+++ password/auth_user.c	Fri Mar 14 00:40:02 2003
3
@@ -41,6 +41,7 @@
4
5
6
7
+#undef SPEC_POP_AUTH
8
9
10
 static const char *ERRMSG_PW = "Password mismatch for user \"%s\"";
(-)./files/extra-patch-password::poppassd.c (-28 lines)
Lines 1-28 Link Here
1
--- password/poppassd.c.orig	Sat May  5 18:50:05 2001
2
+++ password/poppassd.c	Sat May  5 18:52:59 2001
3
@@ -284,6 +284,8 @@
4
5
 static char *P1[] =
6
    {
7
+     "changing local password for *\nold password: ",  /* FreeBSD */
8
+     "changing nis password for *\nold password: ",    /* FreeBSD NIS */
9
      "changing password for *\nold password: ",  /* shadow */
10
      "enter login password: ",                   /* Solaris */
11
      "old smb password: ",                       /* smb */
12
@@ -301,6 +303,7 @@
13
14
 static char *P3[] =
15
    {
16
+     "retype new password: ",                    /* FreeBSD */
17
      "re-enter new password:*",                  /* shadow */
18
      "re-enter new password: ",
19
      "retype new smb password: ",                /* smb */
20
@@ -309,6 +312,8 @@
21
22
 static char *P4[] =
23
    {
24
+     "passwd: updating the database...\npasswd: done ", /* FreeBSD */
25
+     "nis password has been changed * ", /* FreeBSD NIS */
26
      "password changed. ", /* shadow */
27
      "password changed ",  /* smb */
28
      ""
(-)./files/extra-patch-password__auth_user.c (+10 lines)
Line 0 Link Here
1
--- password/auth_user.c.orig	Fri Mar 14 00:39:42 2003
2
+++ password/auth_user.c	Fri Mar 14 00:40:02 2003
3
@@ -41,6 +41,7 @@
4
5
6
7
+#undef SPEC_POP_AUTH
8
9
10
 static const char *ERRMSG_PW = "Password mismatch for user \"%s\"";
(-)./files/extra-patch-password__poppassd.c (+28 lines)
Line 0 Link Here
1
--- password/poppassd.c.orig	Sat May  5 18:50:05 2001
2
+++ password/poppassd.c	Sat May  5 18:52:59 2001
3
@@ -284,6 +284,8 @@
4
5
 static char *P1[] =
6
    {
7
+     "changing local password for *\nold password: ",  /* FreeBSD */
8
+     "changing nis password for *\nold password: ",    /* FreeBSD NIS */
9
      "changing password for *\nold password: ",  /* shadow */
10
      "enter login password: ",                   /* Solaris */
11
      "old smb password: ",                       /* smb */
12
@@ -301,6 +303,7 @@
13
14
 static char *P3[] =
15
    {
16
+     "retype new password: ",                    /* FreeBSD */
17
      "re-enter new password:*",                  /* shadow */
18
      "re-enter new password: ",
19
      "retype new smb password: ",                /* smb */
20
@@ -309,6 +312,8 @@
21
22
 static char *P4[] =
23
    {
24
+     "passwd: updating the database...\npasswd: done ", /* FreeBSD */
25
+     "nis password has been changed * ", /* FreeBSD NIS */
26
      "password changed. ", /* shadow */
27
      "password changed ",  /* smb */
28
      ""
(-)./files/patch-popper::pop_pass.c (-21 lines)
Lines 1-21 Link Here
1
--- popper/pop_pass.c.orig	Sat Jun  2 02:24:13 2001
2
+++ popper/pop_pass.c	Sat Sep  8 00:26:27 2001
3
@@ -1226,6 +1226,18 @@
4
         return ( pop_msg ( p, POP_FAILURE, HERE, ERRMSG_PW, p->user ) );
5
     }
6
7
+#    ifdef FREEBSD
8
+
9
+    /*
10
+     * Nor from expired accounts
11
+     */
12
+    if (pw->pw_expire != 0 && pw->pw_expire <= time(NULL)) {
13
+        sleep  ( SLEEP_SECONDS );
14
+	return ( pop_msg ( p, POP_FAILURE, HERE, ERRMSG_ACEXP, p->user ) );
15
+    }
16
+
17
+#    endif /* FreeBSD */
18
+
19
     return ( POP_SUCCESS );
20
 }
21
(-)./files/patch-popper__pop_pass.c (+21 lines)
Line 0 Link Here
1
--- popper/pop_pass.c.orig	Sat Jun  2 02:24:13 2001
2
+++ popper/pop_pass.c	Sat Sep  8 00:26:27 2001
3
@@ -1226,6 +1226,18 @@
4
         return ( pop_msg ( p, POP_FAILURE, HERE, ERRMSG_PW, p->user ) );
5
     }
6
7
+#    ifdef FREEBSD
8
+
9
+    /*
10
+     * Nor from expired accounts
11
+     */
12
+    if (pw->pw_expire != 0 && pw->pw_expire <= time(NULL)) {
13
+        sleep  ( SLEEP_SECONDS );
14
+	return ( pop_msg ( p, POP_FAILURE, HERE, ERRMSG_ACEXP, p->user ) );
15
+    }
16
+
17
+#    endif /* FreeBSD */
18
+
19
     return ( POP_SUCCESS );
20
 }
21
(-)./files/qpopper.in (-11 / +9 lines)
Lines 1-23 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
# $FreeBSD: /tmp/pcvs/ports/mail/qpopper/files/qpopper.in,v 1.1 2012-02-14 21:35:43 dougb Exp $
3
#
4
# PROVIDE: qpopper
2
# PROVIDE: qpopper
5
# REQUIRE: SERVERS
3
# REQUIRE: DAEMON
6
# KEYWORD: shutdown
4
# KEYWORD: shutdown
7
#
5
8
# Add the following lines to /etc/rc.conf to enable qpopper:
6
# qpopper_enable (bool):	Set to NO by default.
9
# qpopper_enable="YES"
7
#				Set it to YES to enable qpopper.
8
# qpopper_flags (str):		Set to "-f %%PREFIX%%/etc/qpopper.config" by default.
10
. /etc/rc.subr
9
. /etc/rc.subr
11
name=qpopper
10
name=qpopper
12
rcvar=qpopper_enable
11
rcvar=qpopper_enable
13
load_rc_config $name
12
load_rc_config ${name}
14
13
: ${qpopper_enable:="NO"}
15
qpopper_enable=${qpopper_enable:-"NO"}
14
: ${qpopper_flags:="110 -S -f %%PREFIX%%/etc/${name}.config"}
16
15
command="%%PREFIX%%/libexec/${name}"
17
command=%%PREFIX%%/libexec/qpopper
18
run_rc_command "$1"
16
run_rc_command "$1"
(-)./pkg-descr (-1 / +1 lines)
Lines 3-6 Link Here
3
Don't forget to edit /etc/inetd.conf to enable the server after installation.
3
Don't forget to edit /etc/inetd.conf to enable the server after installation.
4
WWW:	http://www.eudora.com/products/unsupported/qpopper/
4
WWW: http://www.eudora.com/products/unsupported/qpopper/
(-)./pkg-install (-3 / +3 lines)
Lines 4-18 Link Here
4
# based on original from op port, written by Cyrille Lefevre
4
# based on original from op port, written by Cyrille Lefevre
5
# <clefevre@citeweb.net>
5
# <clefevre@citeweb.net>
6
[ $# != 2 ] && exit 1
6
[ ! $# = 2 -a ! $# = 4 ] && exit 1
7
PKGNAME=$1
7
PKGNAME=$1
8
ACTION=$2
8
ACTION=$2
9
CONF_DIR=${PKG_PREFIX}/etc/qpopper
9
CONF_DIR=${PKG_PREFIX}/etc/qpopper
10
CONF_FILE=popusers
10
CONF_FILE=popusers
11
CONF_OWN=pop
11
CONF_OWN=$3
12
CONF_GRP=daemon
12
CONF_GRP=$4
13
CONF_MODE=444
13
CONF_MODE=444
14
SAMP_SUFX=.sample
14
SAMP_SUFX=.sample
(-)./pkg-plist (-1 / +1 lines)
Lines 3-9 Link Here
3
%%QPOPAUTH%%@exec ln -sf %D/bin/qpopauth %D/bin/qapopauth
3
%%QPOPAUTH%%@exec ln -sf %D/bin/qpopauth %D/bin/qapopauth
4
libexec/qpopper
4
libexec/qpopper
5
%%EPOPPASSD%%libexec/qpoppassd
5
%%EPOPPASSD%%libexec/qpoppassd
6
@exec mkdir -p %%ETCDIR%% && chown %%POP_USER%%:%%POP_GROUP%% %%ETCDIR%% && chmod %%POP_MODE_DIR%% %%ETCDIR%%
6
@exec mkdir -p %%ETCDIR%% && chown %%USERS%%:%%GROUPS%% %%ETCDIR%% && chmod %%POP_MODE_DIR%% %%ETCDIR%%
7
%%ETCDIR%%/popusers.sample
7
%%ETCDIR%%/popusers.sample
8
etc/qpopper.config.sample
8
etc/qpopper.config.sample
9
%%PORTDOCS%%%%DOCSDIR%%/GUIDE.pdf
9
%%PORTDOCS%%%%DOCSDIR%%/GUIDE.pdf
(-)./pkg-req (-13 lines)
Lines 1-13 Link Here
1
if [ "$2" != "INSTALL" ]; then
2
  exit 0
3
fi
4
if ! id -u pop > /dev/null 2>&1; then
5
  echo "You need an account \"pop\" to install this package."
6
  echo "Please add it by hand (try \"man vipw\") and try again."
7
  echo ""
8
  echo "An example passwd entry is:"
9
  echo "pop:*:68:6::0:0:Post Office Owner:/nonexistent:/nonexistent"
10
  echo ""
11
  exit 1
12
fi
13
exit 0
(-)./scripts/pre-install (-16 lines)
Lines 1-16 Link Here
1
#!/bin/sh
2
if ! id -u pop > /dev/null 2>&1; then
3
  echo "You need an account \"pop\" to install this package."
4
  echo "Please add it by hand (try \"man vipw\") and try again."
5
  echo ""
6
  echo "An example passwd entry is:"
7
  echo "pop:*:68:6::0:0:Post Office Owner:/nonexistent:/nonexistent"
8
  echo ""
9
  exit 1
10
fi
11
usrdir=${PREFIX}/etc/qpopper
12
if [ ! -d $usrdir ]; then
13
  mkdir -p $usrdir
14
fi
15
chown pop:daemon $usrdir
16
chmod 700 $usrdir

Return to bug 185285