From owner-freebsd-questions@freebsd.org Tue Jan 12 14:13:58 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 DEBA24D9B8F for ; Tue, 12 Jan 2021 14:13:58 +0000 (UTC) (envelope-from freebsd-questions@m.gmane-mx.org) Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFXck29HGz3Km2 for ; Tue, 12 Jan 2021 14:13:58 +0000 (UTC) (envelope-from freebsd-questions@m.gmane-mx.org) Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1kzKKw-0006BV-5z for freebsd-questions@freebsd.org; Tue, 12 Jan 2021 15:07:54 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Ottavio Caruso Subject: Authoritative guide to configuring Sendmail to use a relay for outgoing mail on FreeBSD? Date: Tue, 12 Jan 2021 14:07:48 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 Content-Language: en-GB X-Rspamd-Queue-Id: 4DFXck29HGz3Km2 X-Spamd-Bar: +++++ X-Spamd-Result: default: False [5.17 / 15.00]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; TO_DN_NONE(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_REJECT(2.00)[yahoo.com : SPF not aligned (relaxed), No valid DKIM,reject]; FORGED_SENDER(0.30)[ottavio2006-usenet2012@yahoo.com,freebsd-questions@m.gmane-mx.org]; SUBJECT_ENDS_QUESTION(1.00)[]; R_DKIM_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[116.202.254.214:from]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[ottavio2006-usenet2012@yahoo.com,freebsd-questions@m.gmane-mx.org]; ASN(0.00)[asn:24940, ipnet:116.202.0.0/16, country:DE]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.83)[-0.829]; FORGED_MUA_THUNDERBIRD_MSGID_UNKNOWN(2.50)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[116.202.254.214:from:127.0.2.255]; NEURAL_SPAM_LONG(1.00)[1.000]; RCVD_COUNT_TWO(0.00)[2]; GREYLIST(0.00)[pass,body]; 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 14:13:58 -0000 Hi, For educational purposes [1], I have to answer the question: "Configure Sendmail [...] to use a relay for outgoing mail. It has be sendmail and not a substitute smtp client such as ssmtp or similar. According to [2], it seems I have to edit sendmail.cf; however. according to an older post on this list [3], one would have to run "make" in /etc/mail and then edit the generated file, presumably `hostname`.mc. On IRC (freenode/#freebsd), I have been told that I can edit any .mc files, then run "make" and that will generate an .cf file. For example freebsd.mc >> freebsd.cf. So, I am basically confused and I wonder if there is a canonical way to do that on FreeBSD. Thanks. [1] https://wiki.lpi.org/wiki/BSD_Specialist_Objectives_V1.0#713.5_Mail_Transfer_Agents_.28MTA.29_Basics_.28weight:_1.29 [2] https://www.freebsd.org/doc/handbook/outgoing-only.html [3] https://lists.freebsd.org/pipermail/freebsd-questions/2004-February/035329.html -- Ottavio Caruso