On Tuesday, 13 February 2024 17:20:40 GMT Arve Barsnes wrote:

> I'm not sure I quite understood where you're having problems, but I
> have a machine that accepts mail from the LAN through postfix, so I'll
> show some of my setup. Replace any <> with your hostnames.
> On the LAN machine I don't have postfix, I only send mail directly to
> the machine with 'sendmail', but I found that I have in
> /etc/mail/mailertable:
> 192.168. smtp:<mail machine hostname>
> <mail machine hostname> esmtp:<mail machine hostname>
> And in /etc/mail/local-host-names I have set <mail machine hostname> -
> maybe that does something, but I send mail directly with sendmail
> either way.

I think those entries must be for sendmail.

> On the postfix machine I have in /etc/postfix/aliases:
> root:           arve
> This should make all mail to root be delivered to me.

Yes, I have root: prh, but postfix still tries to forward mail for 
root@<otherhost> to <otherhost> instead of hanging on to it.

> It also contains a bunch of aliases that I'm not sure if is necessary:
> arve@<hostname>             arve
> arve@<hostname>.lan         arve
> arve@<hostname>.localdomain arve
> arve@<other machine hostname>.lan              arve

I hadn't thought of doing that. When I tried it, postfix complained "Names must 
be local" and wouldn't accept my root@<host> entries.

> In /etc/postfix/main.cf there is this, and I assume at least some of
> this makes this all work:
> myhostname = <hostname>.lan
> inet_interfaces = $myhostname, localhost
> mydestination = $myhostname, localhost.$mydomain, localhost, <hostname>

Isn't <hostname> the same as $myhostname?

> mynetworks = 192.168.0.0/24, 127.0.0.0/8

I'll try setting mynetworks and see what happens.

Thanks, Arve.

-- 
Regards,
Peter.




Reply via email to