Re: [gentoo-user] Help with local mail, please
On Tue, 13 Feb 2024 at 23:11, Peter Humphrey wrote: > On Tuesday, 13 February 2024 17:20:40 GMT Arve Barsnes wrote: > I think those entries must be for sendmail. Yes, that machine has sendmail from mail-mta/opensmtpd, not postfix, not sure it matters. > > In /etc/postfix/main.cf there is this, and I assume at least some of > > this makes this all work: > > myhostname = .lan > > inet_interfaces = $myhostname, localhost > > mydestination = $myhostname, localhost.$mydomain, localhost, > > Isn't the same as $myhostname? No, $myhostname is .lan Like you I've had some trouble in the past, so a lot of this is from trying and failing, but it works as I want it now, so I'm happy-ish. Regards, Arve
Re: [gentoo-user] Help with local mail, please
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: > esmtp: > And in /etc/mail/local-host-names I have set - > 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@ to instead of hanging on to it. > It also contains a bunch of aliases that I'm not sure if is necessary: > arve@ arve > arve@.lan arve > arve@.localdomain arve > arve@.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@ entries. > In /etc/postfix/main.cf there is this, and I assume at least some of > this makes this all work: > myhostname = .lan > inet_interfaces = $myhostname, localhost > mydestination = $myhostname, localhost.$mydomain, localhost, Isn't 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.
Re: [gentoo-user] Help with local mail, please
On Tue, 13 Feb 2024 at 16:52, Peter Humphrey wrote: > For years, I've been using postfix to accept mail from LAN hosts, and from the > Internet via my ISP. This has never worked as I want it - it's just so complex > to set up and understand. Well, it is for a bear of little brain like me. > > Can someone tell me how to make postfix accept all mail addressed to any host > or user on the LAN - and not forward any mail to anywhere at all? It's running > on a single-homed host on the LAN, and all other hosts are also single homed. > Any of four hosts can originate mail, and I have fetchmail running on the same > host to collect POP3 mail from my ISP. Dovecot serves IMAP4 to KMail clients > on the LAN. > > At present, postfix is insisting on forwarding mail addressed to root on a LAN > machine, but it's supposed to be acting on behalf of that machine. Two other > hosts' mails never show up anywhere. 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: esmtp: And in /etc/mail/local-host-names I have set - maybe that does something, but I send mail directly with sendmail either way. On the postfix machine I have in /etc/postfix/aliases: root: arve This should make all mail to root be delivered to me. It also contains a bunch of aliases that I'm not sure if is necessary: arve@ arve arve@.lan arve arve@.localdomain arve arve@.lan arve In /etc/postfix/main.cf there is this, and I assume at least some of this makes this all work: myhostname = .lan inet_interfaces = $myhostname, localhost mydestination = $myhostname, localhost.$mydomain, localhost, mynetworks = 192.168.0.0/24, 127.0.0.0/8 Regards, Arve
[gentoo-user] Help with local mail, please
Hello list, For years, I've been using postfix to accept mail from LAN hosts, and from the Internet via my ISP. This has never worked as I want it - it's just so complex to set up and understand. Well, it is for a bear of little brain like me. Can someone tell me how to make postfix accept all mail addressed to any host or user on the LAN - and not forward any mail to anywhere at all? It's running on a single-homed host on the LAN, and all other hosts are also single homed. Any of four hosts can originate mail, and I have fetchmail running on the same host to collect POP3 mail from my ISP. Dovecot serves IMAP4 to KMail clients on the LAN. At present, postfix is insisting on forwarding mail addressed to root on a LAN machine, but it's supposed to be acting on behalf of that machine. Two other hosts' mails never show up anywhere. Or perhaps there's a more suitable MTA out there? -- Regards, Peter.