Date: Tue, 12 Jan 2021 15:58:35 +0100 From: freebsd@boosten.org To: Ottavio Caruso <ottavio2006-usenet2012@yahoo.com> Cc: freebsd-questions@freebsd.org Subject: Re: Authoritative guide to configuring Sendmail to use a relay for outgoing mail on FreeBSD? Message-ID: <D73191D9-2E89-4C81-8636-DBD3CEAF5A6F@boosten.org> In-Reply-To: <rtkafk$mp8$1@ciao.gmane.io> References: <rtkafk$mp8$1@ciao.gmane.io>
next in thread | previous in thread | raw e-mail | index | archive | help
> Op 12 jan. 2021, om 15:07 heeft Ottavio Caruso via freebsd-questions = <freebsd-questions@freebsd.org> het volgende geschreven: >=20 > Hi, >=20 > For educational purposes [1], I have to answer the question: = "Configure Sendmail [...] to use a relay for outgoing mail. >=20 > It has be sendmail and not a substitute smtp client such as ssmtp or = similar. >=20 > 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. >=20 > 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. >=20 > So, I am basically confused and I wonder if there is a canonical way = to do that on FreeBSD. >=20 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=E2=80=99)dnl Also configure the confDOMAIN_NAME and confHELO_NAME to reflect your = host/domain. Then run =E2=80=98make install=E2=80=99.=20 In my /etc/rc.conf there=E2=80=99s this: sendmail_enable=3D"NO" sendmail_msp_queue_enable=3D"YES" sendmail_outbound_enable=3D"NO" sendmail_submit_enable=3D=E2=80=9CNO" Then run =E2=80=98make restart=E2=80=99 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. Peter =E2=80=94 It never hurts to help=20 - Eek the Cat!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D73191D9-2E89-4C81-8636-DBD3CEAF5A6F>