From nobody Wed Dec 1 03:38:57 2021 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1192818A1DEC for ; Wed, 1 Dec 2021 03:41:08 +0000 (UTC) (envelope-from dewayne@heuristicsystems.com.au) Received: from heuristicsystems.com.au (hermes.heuristicsystems.com.au [203.41.22.115]) (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 client-signature RSA-PSS (2560 bits) client-digest SHA256) (Client CN "hermes.heuristicsystems.com.au", Issuer "Heuristic Systems Type 4 Host CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J3lHP0lDtz3M6L for ; Wed, 1 Dec 2021 03:41:04 +0000 (UTC) (envelope-from dewayne@heuristicsystems.com.au) Received: from [10.0.5.3] (noddy.hs [10.0.5.3]) (authenticated bits=0) by heuristicsystems.com.au (8.15.2/8.15.2) with ESMTPSA id 1B13dSxe020980 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Wed, 1 Dec 2021 14:39:29 +1100 (AEDT) (envelope-from dewayne@heuristicsystems.com.au) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=heuristicsystems.com.au; s=hsa; t=1638329969; x=1638934770; bh=YgBvPGmKEG2NPVyfMrdVWWXqbfeFmPQ29JQdJIEOnWc=; h=Message-ID:Date:Subject:To:From; b=Xak3gKNxyu3CDb3XErKRStwWktM1H82LjKuz7Ebw3AQDAM8/OnV8NYXVYScZG/qCY ZT87vEJMHmt9T9x7muwznfqe1HLBm/HD7hf7Juh6Z1xAaT3qmHUGK09Ei/4Z5IBTiT lMM5FMCiUE7+hj8omytN0/qTNKb0cZRC1tOec5t0WadDr16750RML X-Authentication-Warning: b3.hs: Host noddy.hs [10.0.5.3] claimed to be [10.0.5.3] Message-ID: Date: Wed, 1 Dec 2021 14:38:57 +1100 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:91.0) Gecko/20100101 Thunderbird/91.1.2 Subject: Re: sendmail without root privs cannot bind. Content-Language: en-GB To: "questions@FreeBSD.org" References: <2de7a896-60ac-3b96-4b1d-a9c276d19b74@qeng-ho.org> From: Dewayne Geraghty In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4J3lHP0lDtz3M6L X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=heuristicsystems.com.au header.s=hsa header.b=Xak3gKNx; dmarc=none; spf=pass (mx1.freebsd.org: domain of dewayne@heuristicsystems.com.au designates 203.41.22.115 as permitted sender) smtp.mailfrom=dewayne@heuristicsystems.com.au X-Spamd-Result: default: False [-6.08 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[heuristicsystems.com.au:s=hsa]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_MED(-2.00)[heuristicsystems.com.au:dkim]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; HAS_XAW(0.00)[]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.88)[-0.883]; DMARC_NA(0.00)[heuristicsystems.com.au]; RCVD_IN_DNSWL_MED(-0.20)[203.41.22.115:from]; DKIM_TRACE(0.00)[heuristicsystems.com.au:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; TO_DN_EQ_ADDR_ALL(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.993]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:1221, ipnet:203.40.0.0/13, country:AU]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On 1/12/2021 1:17 pm, Olivier Nicole wrote: > Dewayne, > >>> Thanks Arthur. I'm unsure, but I manually stopped sendmail and set >>> security.mac.portacl.rules, then restarted. Though I did verify >>> security.mac.portacl.port_high which needed to be increased to catch >>> 587. The problem remains elusive and I'm out of ideas. :( >> >> Maybe it would help if you could provide the running configuration for >> all the security.mac.portal. >> >> Also, you should not need a reboot, restarting sendmail should be enough. > Sorry, I should have posted to FreeBSD list, not to you. > > And also, I think that Apache and named start as root and only change > user after they bound to their respective ports. > > And I think that security.mac.portacl.port_high should be 1023, so I > don't see a need to "increase it to 587". > > Best regards, > > Olivier Hi Oliver.  Its been too long since I started to setup machines without privs that I don't recall which applications drop privs.   My setups has been stable for a few years, apart from updates :) To your questions - I'd previously set security.mac.portacl.port_high to 446, so in my case I did need to increase.   ;) # sysctl security.mac.portacl security.mac.portacl.rules: uid:25:tcp:25,uid:25:tcp:465,uid:25:tcp:587,uid:53:udp:53,uid:53:tcp:53,uid:53:tcp:153,uid:80:tcp:80,uid:80:tcp:443 security.mac.portacl.port_high: 588 security.mac.portacl.autoport_exempt: 1 security.mac.portacl.suser_exempt: 1 security.mac.portacl.enabled: 1 Sendmail's RELEASE_NOTES suggest that running as non-root is possible, though perhaps only as a relay, over port 25? Kind regards, Dewayne