Skip to content
Permalink
Browse files

Changed spool and lock file locations

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@14471 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Mark Duling
Mark Duling committed Oct 8, 2005
1 parent aa9f985 commit 5cda75c02775ef451af7d9065fb65a6140c564eb
Showing with 20 additions and 16 deletions.
  1. +20 −16 mail/vm-pop3d/Portfile
@@ -1,4 +1,4 @@
# $Id: Portfile,v 1.1 2005/09/23 01:44:39 markd Exp $
# $Id: Portfile,v 1.2 2005/10/08 05:24:53 markd Exp $

PortSystem 1.0

@@ -24,8 +24,8 @@ checksums md5 0399cc06f5329a6eaebec05d959a6ec1

destroot.destdir prefix=${destroot}${prefix}

depends_lib port:DarwinPortsStartup \
port:postfix
depends_lib port:postfix \
port:DarwinPortsStartup

configure.args --enable-virtual

@@ -35,7 +35,7 @@ pre-configure {
"${worksrcpath}/vm-pop3d.h"

# Set vm-pop3d.h virtual directory domain spool path
reinplace "s|/var/spool/virtual|${prefix}/var/spool/${name}|g" \
reinplace "s|/var/spool/virtual|${prefix}/var/${name}/spool|g" \
"${worksrcpath}/vm-pop3d.h"

# Set vm-pop3d.h virtual directory domain password path
@@ -45,14 +45,18 @@ pre-configure {

post-destroot {
# Create spool and passwd file paths for the virtual domains
xinstall -m 755 -d ${destroot}${prefix}/var/spool/${name}
xinstall -m 755 -d ${destroot}${prefix}/var/${name}/spool
xinstall -m 755 -d ${destroot}${prefix}/etc/${name}
system "chown postfix:postfix ${destroot}${prefix}/var/spool/${name}"
system "chown postfix:postfix ${destroot}${prefix}/var/${name}/spool"

# Create lock file path
xinstall -m 755 -d ${destroot}${prefix}/var/${name}/lock

# Keep the empty virtual spool and passwd file paths
destroot.keepdirs \
${destroot}${prefix}/var/spool/${name} \
${destroot}${prefix}/etc/${name}
${destroot}${prefix}/var/${name}/spool \
${destroot}${prefix}/var/${name}/lock \
${destroot}${prefix}/etc/${name}

# Install documentation type stuff
xinstall -d ${destroot}${prefix}/share/doc/${name}
@@ -64,14 +68,14 @@ destroot.keepdirs \
xinstall -m 644 ${worksrcpath}/README ${destroot}${prefix}/share/doc/${name}
xinstall -m 644 ${worksrcpath}/TODO ${destroot}${prefix}/share/doc/${name}

# Fix and install the init script
# Fix and copy the init script
reinplace "s|daemon vm-pop3d|${prefix}/sbin/vm-pop3d --user postfix --group postfix|g" \
"${worksrcpath}/vm-pop3d.init"

reinplace "s|/usr/local/sbin|${prefix}/sbin|g" \
"${worksrcpath}/vm-pop3d.init"

reinplace "s|/var/lock/subsys|${prefix}/var|g" \
reinplace "s|/var/lock/subsys|${prefix}/var/${name}/lock|g" \
"${worksrcpath}/vm-pop3d.init"

reinplace "s|killproc|killall|g" \
@@ -92,23 +96,23 @@ ui_msg "\n#### To setup vm-pop3d with Postfix ####
Notice: The paths to files used by vm-pop3d are hard coded at compile time so
if you deviate from the paths described below vm-pop3d will not work.

1) Setup Postfix (if not previously used) and create spool directories
1) Setup Postfix (if first-time setup) and create spool directories
for your vm-pop3d virtual domains.

cd /opt/local/etc/postfix
sudo cp master.cf.sample master.cf
sudo cp main.cf.sample main.cf

sudo mkdir ${prefix}/var/spool/${name}/my-vdomain1.com
sudo chown postfix:postfix ${prefix}/var/spool/${name}/my-vdomain1.com
sudo chmod 775 ${prefix}/var/spool/${name}/my-vdomain1.com
sudo mkdir ${prefix}/var/${name}/spool/my-vdomain1.com
sudo chown postfix:postfix ${prefix}/var/${name}/spool/my-vdomain1.com
sudo chmod 775 ${prefix}/var/${name}/spool/my-vdomain1.com


2) Configure Postfix for virtual mailboxes

Add to main.cf

virtual_mailbox_base = ${prefix}/var/spool/${name}
virtual_mailbox_base = ${prefix}/var/${name}/spool
virtual_mailbox_maps = hash:${prefix}/etc/${name}/vmailbox_maps
virtual_mailbox_domains = hash:${prefix}/etc/${name}/vdomain_maps
virtual_uid_maps = static:<postfix user's uid>
@@ -144,7 +148,7 @@ Notice: The paths to files used by vm-pop3d are hard coded at compile time so
Now send an email to an account in a virtual domain; look here to see if
messages are arriving:

ls ${prefix}/var/spool/${name}/my-vdomainx.com for messages.
ls ${prefix}/var/${name}/spool/my-vdomainx.com for messages.

Check the error logs for either delivery errors or (after next step)
POP errors:

0 comments on commit 5cda75c

Please sign in to comment.
You can’t perform that action at this time.