"Turning off Apple's MTA" after postfix port install

Mark Duling mark.duling at biola.edu
Mon Sep 25 22:00:29 PDT 2006


Charlie Allom <yeled at macports.org> writes:
>> sudo mv /usr/sbin/sendmail /usr/sbin/sendmail.old
>> sudo ln -s /opt/local/sbin/sendmail /usr/sbin/sendmail
>
>this can be accomplished various ways. I use my $PATH personally.

You mean put MacPorts paths first?  I did that and all was well except the
one thing I needed postfix for.  Namely, sending mail with the 'mail'
executable on the MTA host.  I guess 'mail' isn't part of postfix and
Apple's 'mail' executable must be hardcoded to use /usr/sbin/sendmail
because it would not look at MacPorts' postfix alias file.  So that's why
I had to use the symlink.  It may be most people don't need to send mail
with 'mail' from the MTA host, but some apps need this and it should work
anyway.
>
>> Is that disabling the local MTA in its entirety?  Or just a part of it? 
>
>Apple have an extra tool that starts postfix "when needed"
>
>http://www.opensource.apple.com/darwinsource/10.4.7.x86/postfix-147/watchpostfix.c
>
>either recompile that, or chmod -x it.

I can't find a postfix-watch command.  But I suppose it wouldn't matter
anyway if Apple's LaunchDaemon is removed?
>
>> Because I want to change the ui_msg's to be more accurate so people will
>> know and not spend the time I did figuring out how to make it all work
>and
>> I'm not sure if I've done all that should be done.
>
>also edit/remove the launchd item yadda yadda yadda..

So would it be ok if I modified the ui_msgs from this:

ui_msg "To get postfix working, you need to copy sample configuration "
ui_msg "files and to edit them (${prefix}/etc/postfix/*.sample)."
ui_msg "You may also want to turn your system's MTA off."

to this:

ui_msg "\n
To get postfix working, you need to copy the sample configuration
files and edit them (${prefix}/etc/postfix/*.sample).  You may also
want to turn off Apple's built-in MTA.  For example, on 10.4:

-Delete /System/Library/LaunchDaemons/org.postfix.master.plist
-Replace the built-in sendmail file with a symlink to MacPorts' sendmail:
	sudo mv /usr/sbin/sendmail /usr/sbin/sendmail.org
	ln -s ${prefix}local/sbin/sendmail /usr/sbin/sendmail \n"


I think it will help reduce headaches and questions to the list.

Mark




More information about the macports-dev mailing list