The following diff makes it so that the imapproxy port installs an example configuration which by default will make imapproxy chroot itself. As well as some minor cleaning of the port.
Index: Makefile =================================================================== RCS file: /cvs/ports/mail/imapproxy/Makefile,v retrieving revision 1.5 diff -u -p -r1.5 Makefile --- Makefile 24 Jul 2007 19:38:01 -0000 1.5 +++ Makefile 22 Aug 2007 06:55:41 -0000 @@ -1,9 +1,9 @@ # $OpenBSD: Makefile,v 1.5 2007/07/24 19:38:01 ckuethe Exp $ -COMMENT= "caching IMAP proxy to be used with webmail clients" +COMMENT= caching IMAP proxy to be used with webmail clients DISTNAME= up-imapproxy-1.2.5 -PKGNAME= ${DISTNAME:S/^up-//}p0 +PKGNAME= ${DISTNAME:S/^up-//}p1 CATEGORIES= mail HOMEPAGE= http://www.imapproxy.org/ Index: patches/patch-Makefile_in =================================================================== RCS file: /cvs/ports/mail/imapproxy/patches/patch-Makefile_in,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 patch-Makefile_in --- patches/patch-Makefile_in 8 May 2005 12:22:09 -0000 1.1.1.1 +++ patches/patch-Makefile_in 22 Aug 2007 06:54:03 -0000 @@ -1,6 +1,6 @@ ---- Makefile.in.orig Mon Feb 21 20:14:47 2005 -+++ Makefile.in Sun May 8 11:40:26 2005 -@@ -53,7 +53,7 @@ TAT_OBJ = ./src/pimpstat.o ./src/config. +--- Makefile.in.orig Tue Jan 30 10:23:46 2007 ++++ Makefile.in Wed Aug 22 02:53:26 2007 +@@ -53,7 +53,7 @@ TAT_OBJ = ./src/pimpstat.o ./src/config.o # Final targets Index: patches/patch-imapproxy_h =================================================================== RCS file: /cvs/ports/mail/imapproxy/patches/patch-imapproxy_h,v retrieving revision 1.2 diff -u -p -r1.2 patch-imapproxy_h --- patches/patch-imapproxy_h 18 Oct 2006 10:03:50 -0000 1.2 +++ patches/patch-imapproxy_h 22 Aug 2007 06:54:06 -0000 @@ -1,6 +1,6 @@ ---- include/imapproxy.h.orig Mon Feb 21 20:14:51 2005 -+++ include/imapproxy.h Wed Oct 18 11:47:02 2006 -@@ -141,7 +141,7 @@ +--- include/imapproxy.h.orig Tue Jan 30 10:23:46 2007 ++++ include/imapproxy.h Wed Aug 22 02:53:26 2007 +@@ -151,7 +151,7 @@ /* * Common definitions */ @@ -9,7 +9,7 @@ #define IMAP_UNTAGGED_OK "* OK " /* untagged OK response */ #define IMAP_TAGGED_OK "1 OK " /* tagged OK response */ #define BUFSIZE 4096 /* default buffer size */ -@@ -159,7 +159,7 @@ +@@ -169,7 +169,7 @@ #define SELECT_STATUS_BUF_SIZE 256 /* size of select status */ #ifndef DEFAULT_CONFIG_FILE Index: patches/patch-scripts_imapproxy_conf =================================================================== RCS file: /cvs/ports/mail/imapproxy/patches/patch-scripts_imapproxy_conf,v retrieving revision 1.1 diff -u -p -r1.1 patch-scripts_imapproxy_conf --- patches/patch-scripts_imapproxy_conf 24 Jul 2007 19:38:01 -0000 1.1 +++ patches/patch-scripts_imapproxy_conf 22 Aug 2007 06:54:28 -0000 @@ -1,6 +1,6 @@ $OpenBSD: patch-scripts_imapproxy_conf,v 1.1 2007/07/24 19:38:01 ckuethe Exp $ ---- scripts/imapproxy.conf.orig Thu Jul 19 22:38:42 2007 -+++ scripts/imapproxy.conf Thu Jul 19 22:39:09 2007 +--- scripts/imapproxy.conf.orig Tue Jan 30 10:23:46 2007 ++++ scripts/imapproxy.conf Wed Aug 22 02:53:55 2007 @@ -67,14 +67,14 @@ cache_expiration_time 300 ## This setting controls which username the imap proxy process will run as. ## It is not allowed to run as "root". @@ -15,6 +15,15 @@ $OpenBSD: patch-scripts_imapproxy_conf,v # -proc_groupname nobody +proc_groupname _imapproxy + + + # +@@ -164,7 +164,7 @@ force_tls no + ## a directory is specified here, imapproxy will chroot() to that + ## directory. + # +-#chroot_directory /var/empty ++chroot_directory /var/empty # Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/mail/imapproxy/pkg/PLIST,v retrieving revision 1.2 diff -u -p -r1.2 PLIST --- pkg/PLIST 24 Jul 2007 19:38:01 -0000 1.2 +++ pkg/PLIST 19 Aug 2007 22:02:07 -0000 @@ -3,9 +3,9 @@ @newuser _imapproxy:592:_imapproxy:daemon:IMAP Proxy Account:/nonexistent:/sbin/nologin sbin/imapproxyd sbin/pimpstat -share/examples/imapproxy/ -share/examples/imapproxy/imapproxy.conf [EMAIL PROTECTED] ${SYSCONFDIR}/imapproxy.conf share/doc/imapproxy/ share/doc/imapproxy/README share/doc/imapproxy/README.ssl +share/examples/imapproxy/ +share/examples/imapproxy/imapproxy.conf [EMAIL PROTECTED] ${SYSCONFDIR}/imapproxy.conf