ports/132213: [patch] mail/imap-uw: Add support for ~/mail as default mailbox directory
Jarrod Sayers
jarrod at netleader.com.au
Sun Mar 1 04:30:02 UTC 2009
>Number: 132213
>Category: ports
>Synopsis: [patch] mail/imap-uw: Add support for ~/mail as default mailbox directory
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun Mar 01 04:30:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Jarrod Sayers
>Release: FreeBSD 7.0-RELEASE-p9 i386
>Organization:
>Environment:
System: FreeBSD manhattan.netleader.com.au 7.0-RELEASE-p9 FreeBSD 7.0-RELEASE-p9 #7: Mon Jan 19 18:50:08 CST 2009 root at manhattan.netleader.com.au:/usr/obj/usr/src/sys/MANHATTAN i386
>Description:
By default, mail/imap-uw will grant authenticated users access to their entire
home directory via the IMAP protocol. In some situations, usually for security
reasons, this isn't a desired feature as additional directories and dot files
appear when users attempt to subscribe to additional mailboxes.
This optional patch, forces the IMAP root to be ~/mail for authenticated users
which is also the default path used for some MUA's such as mail/alpine and removes
the need for some users to configure a default prefix in either their GUI or console
based MUA.
Modified files:
- ports/mail/cclient/Makefile
- ports/mail/imap-uw/Makefile
>How-To-Repeat:
>Fix:
Downloadable diff from :
http://www.netleader.com.au/~jarrod/FreeBSD/mail-cclient-mailsubdir.diff
--- mail-cclient-mailsubdir.diff begins here ---
diff -ruN ports/mail/cclient.orig/Makefile ports/mail/cclient/Makefile
--- ports/mail/cclient.orig/Makefile 2009-02-28 17:56:22.000000000 +1030
+++ ports/mail/cclient/Makefile 2009-03-01 14:19:40.000000000 +1030
@@ -7,6 +7,7 @@
PORTNAME= cclient
PORTVERSION= 2007e
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= mail devel ipv6
MASTER_SITES= ftp://ftp.cac.washington.edu/imap/%SUBDIR%/ \
@@ -22,7 +23,8 @@
OPTIONS= SSL "Compile with SSL support" on \
SSL_AND_PLAINTEXT "Allow plain text passwords and SSL" off \
IPV6 "Support IPv6" on \
- MBX_DEFAULT "Use MBX as default mailbox format" off
+ MBX_DEFAULT "Use MBX as default mailbox format" off \
+ HOME_MAIL_DIR "Use ~/mail as default mailbox dir" off
.include <bsd.port.pre.mk>
@@ -61,6 +63,10 @@
@${REINPLACE_CMD} -e "s|^CREATEPROTO=unixproto|CREATEPROTO=mbxproto|" \
${WRKSRC}/src/osdep/unix/Makefile
.endif
+.if defined(WITH_HOME_MAIL_DIR)
+ @${REINPLACE_CMD} -e "s|\*mailsubdir = NIL;|\*mailsubdir = \"mail\";|" \
+ ${WRKSRC}/src/osdep/unix/env_unix.c
+.endif
post-configure:
@${ECHO_MSG} ">> The c-client shared library will be named ${SHLIBNAME}"
diff -ruN ports/mail/imap-uw.orig/Makefile ports/mail/imap-uw/Makefile
--- ports/mail/imap-uw.orig/Makefile 2009-02-28 17:56:42.000000000 +1030
+++ ports/mail/imap-uw/Makefile 2009-03-01 14:20:47.000000000 +1030
@@ -7,6 +7,7 @@
PORTNAME= imap
PORTVERSION= 2007e
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= mail ipv6
MASTER_SITES= ftp://ftp.cac.washington.edu/imap/%SUBDIR%/ \
@@ -27,7 +28,8 @@
OPTIONS= SSL "Compile with SSL support" on \
SSL_AND_PLAINTEXT "Allow plain text passwords and SSL" off \
DRAC "Dynamically open MTA for relaying" off \
- NETSCAPE_BRAIN_DAMAGE "See Makefile for documentation" off
+ NETSCAPE_BRAIN_DAMAGE "See Makefile for documentation" off \
+ HOME_MAIL_DIR "Use ~/mail as default mailbox dir" off
.include <bsd.port.pre.mk>
@@ -60,6 +62,12 @@
.endif
# See src/imapd/Makefile for more information about these three options.
+post-patch:
+.if defined(WITH_HOME_MAIL_DIR)
+ @${REINPLACE_CMD} -e "s|\*mailsubdir = NIL;|\*mailsubdir = \"mail\";|" \
+ ${WRKSRC}/src/osdep/unix/env_unix.c
+.endif
+
pre-build:
@${SH} ${PKGREQ}.rev ${LOCALBASE}/include/c-client/portrevision.h ${PORTVERSION}
.if !defined(WITHOUT_SSL)
--- mail-cclient-mailsubdir.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list