I happen to store many of my postfix configuration files in a different directory than PREFIX/etc/postfix. I store things like aliases, generic, main.cf, master.cf, and transport all in /conf/ME/postfix. Up until now, my postfix installation/upgrade has consisted of installing the port, then doing this: # cd /usr/local/etc/postfix # rm main.cf master.cf # ln -s /conf/ME/postfix/main.cf # ln -s /conf/ME/postfix/master.cf I came across the manpage entry for postfix(8) which says that you can use "-c directory" to the postfix start/stop command to specify an alternate location of a postfix installation, or use -v or -D for logging verbosity/debugging. I decided to make a $postfix_flags variable in rc.d/postfix which would allow these flags to be passed to postfix(8) when starting. Thus I can now do in rc.conf: postfix_enable="yes" postfix_flags="-c /conf/ME/postfix" ...and no longer require symlinks in PREFIX/etc/postfix. (Using that method also makes a mess when doing a postfix upgrade, since the configuration backup/restore doesn't handle symlinks how I'd like. :) No need to change that though.) There's one caveat: PREFIX/etc/postfix also contains a couple necessary scripts and files, such as makedefs.out, post-install, postfix-files, and postfix-script (the most important one). Those who want to use the -c dir option will have to do something like this, or else postfix-script and friends won't work: # cd /conf/ME/postfix # ln -s /usr/local/etc/postfix/makedefs.out # ln -s /usr/local/etc/postfix/post-install # ln -s /usr/local/etc/postfix/postfix-files # ln -s /usr/local/etc/postfix/postfix-script The reason for this is that the postfix(8) script explicitly looks for postfix-script as $config_directory/postfix-script. It's not a bug; it's just how things are done in postfix(8). Fix: Apply the below patch. How-To-Repeat: n/a
Responsible Changed From-To: freebsd-ports-bugs->koitsu Submitter has GNATS access
State Changed From-To: open->feedback Awaiting maintainers feedback
On Feb 13, 2007, at 4:28 PM, Edwin Groothuis wrote: > Maintainer of mail/postfix, > > Please note that PR ports/109137 has just been submitted. > > If it contains a patch for an upgrade, an enhancement or a bug fix > you agree on, reply to this email stating that you approve the patch > and a committer will take care of it. I approve the application of this patch. I don't see the need to increment PORTREVISION on this change, as it doesn't affect any existing users.
koitsu 2007-02-20 22:36:40 UTC FreeBSD ports repository Modified files: mail/postfix/files postfix.sh.in mail/postfix-current/files postfix.sh.in Log: Addition of postfix_flags variable to rc.subr startup script. This variable is passed to postfix-script on startup, allowing administrators to do things like postfix_flags="-c /my/place/postfix" (alternate location of main.cf and master.cf), or postfix_flags="-v" (for verbose logging). See postfix(1) manpage for flags. PR: ports/109137 Reviewed by: Vivek Khera <vivek@khera.org> Approved by: philip Revision Changes Path 1.5 +6 -3 ports/mail/postfix-current/files/postfix.sh.in 1.5 +6 -3 ports/mail/postfix/files/postfix.sh.in _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: feedback->closed Committed. Thanks!