From owner-freebsd-questions@freebsd.org Tue Jan 12 16:53:30 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 899404DE9A4 for ; Tue, 12 Jan 2021 16:53:30 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.135]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFc8m71nBz3pl1 for ; Tue, 12 Jan 2021 16:53:28 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([94.222.27.40]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPA (Nemesis) id 1Mwfj0-1k2JK41zOU-00y8A7; Tue, 12 Jan 2021 17:53:22 +0100 Date: Tue, 12 Jan 2021 17:53:22 +0100 From: Polytropon To: freebsd@boosten.org Cc: Peter Boosten via freebsd-questions , Ottavio Caruso Subject: Re: Authoritative guide to configuring Sendmail to use a relay for outgoing mail on FreeBSD? Message-Id: <20210112175322.b35d6ea7.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:0snmshs/Y8BUpEeTujmPcEs17+009I20Sgs61bl08t9sqa4EVpP iHcFkCHbiOWZlEq/LwjWZYHqXqoig6QT7AwMOzl+V9hzbJU17k28UAU5Q08x/UkMH7yKkTY csA/OG7tSUNA5UyfGGuI/LWfBGEfkEqoqjiVTVEqtRgwtpuV6T/cMOW66tqcFoHxBJjK4jq A68ZX9VKxw4rdn0wbyzSw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:qH2bjiEzLyo=:6YCnpdJ7iy0rkIqZY6QwE4 3CJ/4Ur55nnQXS17N2RQRQ1WoeniJSAD8pHNCjy5YuKB/GSNrwjjQUqFbu/CpoQxqkCIFEE9h RVvBnVKAhsM8SIwb9Im/mNwFxm44oWUCLPgZJoxpY6HFuI58Wf0yjlKNAdU9JhIw8U7gBrYru zYxzzlgfZwBW3nUl+x0CLhFlLm5hnFu+6929Ez/p0C2sRWbM4QKGLTrUuTXkoFhJ6fKolqxlg 1BdDgpiV0X184QlUhkHs8zRz5pbHxZQbw42h5yLgnTp1BV7Kou4RjBgHTOhBonR+BADzAXT3f mueHmW9DM6i186zjyVsem3whNM0bOZlSSx5Ui0zh5Xw+d9LLDSOVGNfWXSy9LbPU5UJ4dcDqp NcC1kocXsT42gRGjyn67paZpCgh5f2NJC2XVByheyNdfAt8Go3f97BloMBNMp X-Rspamd-Queue-Id: 4DFc8m71nBz3pl1 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 212.227.126.135) smtp.mailfrom=freebsd@edvax.de X-Spamd-Result: default: False [0.40 / 15.00]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; MIME_TRACE(0.00)[0:+]; RECEIVED_SPAMHAUS_PBL(0.00)[94.222.27.40:received]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[212.227.126.135:from]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; RWL_MAILSPIKE_VERYGOOD(0.00)[212.227.126.135:from]; FREEMAIL_CC(0.00)[freebsd.org,yahoo.com]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 16:53:30 -0000 On Tue, 12 Jan 2021 15:58:35 +0100, Peter Boosten via freebsd-questions wrote: > Basically all my jails use another jail as mail hub: > > Change /etc/mail/freebsd.submit.mc to reflect the correct mail hub > > FEATURE(`msp', `[your.smart.host]', `MSA’)dnl > > Also configure the confDOMAIN_NAME and confHELO_NAME to reflect your > host/domain. > > Then run ‘make install’. > > In my /etc/rc.conf there’s this: > > sendmail_enable="NO" > sendmail_msp_queue_enable="YES" > sendmail_outbound_enable="NO" > sendmail_submit_enable=“NO" > > Then run ‘make restart’ in your /etc/mail directory. > > This basically makes the machine not accept email from outside (only > from the machine itself) and forwards everything to your smart host. In the past, I have been using my ISP's mail relay until they cut support for that. In order to have all outgoing messages to be sent through the ISP's relay (instead of having my own sendmail doing that, especially from behind a dynamic IP), I had the followint setting in /etc/mail/`hostname`.mc: define(`SMART_HOST', `mx.example.com') where mx.example.com is the mail relay I wanted to use, and it worked for all systems from within the network of the ISP. With a "make install", the setting was activated, and it worked for many happy years. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...