On 29/12/2023 15.28, Ubence Quevedo (thatrat) wrote:
That's just it, I am using mail from /opt/local/bin/:
uquevedo@ubence-mini-wired ~ % which mail
/opt/local/bin/mail
I shouldn't have to use a specific executable if it's attaching to a
standard port for a running service?
Unless there's something configuration wise that I'm not seeing about
what port the postfix from MacPorts is doing?
mail(1) does not connect to port 25 or 587 by default, if you wanted to
imply that. Unless you configured it differently, /opt/local/bin/mail
might probably still use /usr/sbin/sendmail, but I am not sure about that.
Depending on your macOS version, it already ships with postfix. The
relevant sockets are already bound by launchd to run the macOS postfix
installation on-demand. You won't see any running daemon processes as it
is only activated by launchd on an incoming connection as configured in
the /System/Library/LaunchDaemons/com.apple.postfix.master.plist file.
There is no way to get rid of this postfix setup unless you disable
System Integrity Protection (SIP).
If your intention is just to set up a relay over an external SMTP
server, you could just use the macOS provided postfix. I described such
a setup on my personal blog a while ago with a specific setup that was
required for macOS 10.12 Sierra, but the general instructions should
still apply today:
https://raimue.blog/2018/03/22/postfix-with-relayhost-over-stunnel-on-macos-10-12-sierra/
Rainer