Date: Sun, 1 Mar 2009 14:53:44 +1030 (CST) From: Jarrod Sayers <jarrod@netleader.com.au> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/132213: [patch] mail/imap-uw: Add support for ~/mail as default mailbox directory Message-ID: <200903010423.n214NiW0038651@manhattan.netleader.com.au> Resent-Message-ID: <200903010430.n214U11r075038@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903010423.n214NiW0038651>