Re: Name resolution in FreeBSD/Postfix

From: Paul Procacci <pprocacci_at_gmail.com>
Date: Tue, 05 Nov 2024 19:11:30 UTC
On Tue, Nov 5, 2024 at 1:42 PM Paul M. Foster <paulf@quillandmouse.com> wrote:
>
>
> On 11/5/24 12:08, Paul Procacci wrote:
> > On Tue, Nov 5, 2024 at 12:02 PM Paul M. Foster <paulf@quillandmouse.com> wrote:
> >> Folks:
> >>
> >> Trying to configure Postfix to route local mail (internet is later).
> >> During a telnet conversation with Postfix to send it mail for a local
> >> user, it chokes on paulf@localhost recipient, with a 451 4.3.0 error.
> >> This is my user, and it's in the /etc/passwd file. So I don't understand
> >> why it doesn't understand the recipient email address. And yes,
> >> localhost is 127.0.0.1 in the /etc/hosts file.
> >>
> >> Can anyone enlighten me?
> >>
> >> Paul
> >>
> >> ou should probably include your config.
> >> My guess is postfix needs to be told explicitly that localhost is a
> >> domain it's servicing yet hasn't been told that.
> >>
> >> ~Paul
>
>
> Contents of /usr/local/etc/mail/mailer.conf:
>
> ===
>
> sendmail /usr/local/sbin/sendmail
>
> send-mail /usr/local/sbin/sendmail
>
> mailq /usr/local/sbin/sendmail
>
> newaliases /usr/local/sbin/sendmail
>
> myhostname = banzai
>
> mydomain = mars.lan
>
> mydestination = $myhostname, localhost.$mydomain, localhost
>
> inet_interfaces = $myhostname, localhost
>
> mynetworks_style = hosts
>
> default_transport = error: outside mail is not deliverable
>
> ===
>
> Paul
>
> --
> Paul M. Foster
> Personal Blog: http://noferblatz.com
> Company Site: http://quillandmouse.com
> Software Projects: https://gitlab.com/paulmfoster
>

"mynetworks_style = hosts"

This setting only forwards mail from the local machine only.  If
you're telnet'ing to the port on 25 or whatever, this isn't any longer
considered local.
That's my hunch here anyways.  Here's the documentation for it:
https://www.postfix.org/BASIC_CONFIGURATION_README.html

I could be misunderstanding it too as I don't use postfix, but maybe
someone else could confirm this.

~Paul

-- 
__________________

:(){ :|:& };: