From: Arve Barsnes <arve.barsnes@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Help with local mail, please
Date: Tue, 13 Feb 2024 18:20:40 +0100 [thread overview]
Message-ID: <CAJjrzcW0aoqk7NPrCfMnoyJs93-o2qr0XZnc998NXCgXUHVDuw@mail.gmail.com> (raw)
In-Reply-To: <4880323.GXAFRqVoOG@cube>
On Tue, 13 Feb 2024 at 16:52, Peter Humphrey <peter@prh.myzen.co.uk> 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:<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.
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@<hostname> arve
arve@<hostname>.lan arve
arve@<hostname>.localdomain arve
arve@<other machine hostname>.lan arve
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>
mynetworks = 192.168.0.0/24, 127.0.0.0/8
Regards,
Arve
next prev parent reply other threads:[~2024-02-13 17:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-13 15:52 [gentoo-user] Help with local mail, please Peter Humphrey
2024-02-13 17:20 ` Arve Barsnes [this message]
2024-02-13 22:11 ` Peter Humphrey
2024-02-13 22:39 ` Arve Barsnes
2024-02-14 11:35 ` J. Roeleveld
2024-02-16 5:19 ` Peter Humphrey
2024-02-16 12:30 ` J. Roeleveld
2024-02-16 15:47 ` Peter Humphrey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJjrzcW0aoqk7NPrCfMnoyJs93-o2qr0XZnc998NXCgXUHVDuw@mail.gmail.com \
--to=arve.barsnes@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox