"Turning off Apple's MTA" after postfix port install
The postfix port's ui_msg's say ".... you may also want to turn off your system's MTA". At first I thought I didn't have to do anything because it worked immediately, but then I discoverd that when sending mail with the 'mail' command locally it was blind to the local aliases. Here is what I did to fix that: sudo mv /usr/sbin/sendmail /usr/sbin/sendmail.old sudo ln -s /opt/local/sbin/sendmail /usr/sbin/sendmail Is that disabling the local MTA in its entirety? Or just a part of it? 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. Mark
On Mon, Sep 25, 2006 at 05:45:24PM -0700, Mark Duling wrote:
The postfix port's ui_msg's say ".... you may also want to turn off your system's MTA". At first I thought I didn't have to do anything because it worked immediately, but then I discoverd that when sending mail with the 'mail' command locally it was blind to the local aliases. Here is what I did to fix that:
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.
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/watchpos... either recompile that, or chmod -x it.
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.. -- hail eris http://rubberduck.com/
Charlie Allom <yeled@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/watchpos...
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
On Mon, Sep 25, 2006 at 10:00:29PM -0700, Mark Duling wrote:
Charlie Allom <yeled@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 15:08 eris:~% strings /usr/bin/mail|grep sendmail %*s [- sendmail-options ...] sendmail /usr/sbin/sendmail
I can't find a postfix-watch command. But I suppose it wouldn't matter anyway if Apple's LaunchDaemon is removed?
sure
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"
go for it. -- hail eris http://rubberduck.com/
participants (2)
-
Charlie Allom
-
Mark Duling