Skip to content

HOWTO: FreeBSD Jails: move postfix queue directory to ssd hard drive (outside the jail)(zfs)

June 21, 2012

1. Create directories where postfix queues and maillogs will be mounted

#mkdir /ssd/postfix/smtp203/maillogs /ssd/postfix/smtp203/queues

2. Mount with nullfs the ssd directories into the freebsd jail directory tree

#mount_nullfs -orw /ssd/postfix/smtp203/maillogs/ /jails/smtp203/maillogs/
#mount_nullfs -orw /ssd/postfix/smtp203/queues/ /jails/smtp203/queues/

3. Enter the jail and make queues directory avail for postfix

#jexec 3 csh

smtp203# grep maillogs /etc/syslog.conf /maillogs/maillog

smtp203#/etc/rc.d/syslogd restart
smtp203# /usr/local/etc/rc.d/postfix stop

smtp203# grep queue_dir /usr/local/etc/postfix/
queue_directory = /queues

4. Make postfix fetch to recreate the queue directories and just restart postfix

smtp203# postfix fetch
smtp203# postfix start


From → Emailling, FreeBSD, Jails

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: