From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C6E0F15808B for ; Tue, 13 Feb 2024 17:20:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E62E9E2A21; Tue, 13 Feb 2024 17:20:53 +0000 (UTC) Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 85DF0E2A03 for ; Tue, 13 Feb 2024 17:20:53 +0000 (UTC) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5116b540163so6794148e87.1 for ; Tue, 13 Feb 2024 09:20:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707844852; x=1708449652; darn=lists.gentoo.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=s0oZ/Vd7akJVfDLURAtVEAEiANseuZtzLmHMr9091Lg=; b=FzCahyxwLW/hEVkCsk5Gouau0/ryUWLuPA2hy4iXydVlp1clLPBL1pr1HZwYkJAzRw Tm7ppfywrwhkHU4JFfFlknvnjpplQgJu+a1IxVory7fXg/ePyOADyAKqnEGTRi93s109 b9jZZosaQhu89thINAnruwCMYwDwmc+3sRiZtfpcxgq/Kv1UzYipNdvfFfd95soau9jO 5pQsouK5pPs5INo8JqgQiq0vXFjoX3ZuaChUJdoIJ3jfdDupyDKxYNEJDLOeQVtxEHzz kGsxxrHGPIBR7SLg0Bj5Yr8KYgoblmOPo6HahY2SEUuHY+oyc0QfpVAbt+b4jQG/o4mn sEtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707844852; x=1708449652; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=s0oZ/Vd7akJVfDLURAtVEAEiANseuZtzLmHMr9091Lg=; b=J5jvyu3Z/IDAx5E83iUvrylAnq7WoCKKyY4402teoSQhVSlkGy0JDYjmSvd5yBEBhJ G7jdHyCzNMAYfbmfrPAjZ4e01GwwF9P+RvDKcYDTJsXSwWgbNPe6Rs3xWlahdv2fA0RB wLMFsYFHDwD4RCu47SguSI+ebjVFZm3rLBtP4dIIEbzRAtGVQpDXMKNm2KeDDc2MwcHF 1ldv8X+28TJd3puZ6TU8k5fGkf3dTHyf/6DT2QLuXyyjBzSiM4aCJyt6nCnDBKJZHi3W GEr4mmAT5aDKA+to0KM8Q1wG/9au2mUID2IhpTnrGps0QoOBB11zNaX57Akaauexyyu+ cCXg== X-Gm-Message-State: AOJu0YwtLrUv0YuiChmGQ4EwCLu58gPcx+5hNJcowXJo7GIO39TaCTBR Z965Yw/JtV6/9JoPHGclFDgVxTUampQgKSEEq62uBWLovj9iTmuGSZNgaSZyyPXnFaehBo8G3Sx ks4+KU1sJ91uYDfe/fe+EcpW73dr7gcd4EPA= X-Google-Smtp-Source: AGHT+IEgN59YGglVugWLPndss/wEcIHAp9diVygq58FaCHt+d1k/4L3E10XyKLJAA1A5pifwCJxzDmkFTmXa1rw5y8o= X-Received: by 2002:a05:6512:34d0:b0:511:71fe:dc10 with SMTP id w16-20020a05651234d000b0051171fedc10mr122914lfr.10.1707844851852; Tue, 13 Feb 2024 09:20:51 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 References: <4880323.GXAFRqVoOG@cube> In-Reply-To: <4880323.GXAFRqVoOG@cube> From: Arve Barsnes Date: Tue, 13 Feb 2024 18:20:40 +0100 Message-ID: Subject: Re: [gentoo-user] Help with local mail, please To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset="UTF-8" X-Archives-Salt: 4963e7e4-0e03-4894-bd36-5f177cbacf3f X-Archives-Hash: 468b8fa8f1c404b18c3ddcd28255070a 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