Add a description on how to configure a local postfix to forward
emails to the FreeBSD smtp servers.
This commit is contained in:
parent
dada9efe52
commit
5c48b21e85
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=52898
1 changed files with 55 additions and 0 deletions
|
@ -2332,6 +2332,61 @@ freebsd-mfc-after = 2 weeks</programlisting>
|
|||
</listitem>
|
||||
</itemizedlist>
|
||||
</note>
|
||||
|
||||
<sect4 xml:id="smtp-setup-local-mta">
|
||||
<title>Using a Local MTA to Forward Emails to the
|
||||
&os;.org SMTP Service</title>
|
||||
|
||||
<para>It is also possible to use a local
|
||||
<acronym>MTA</acronym> to forward locally sent emails to
|
||||
the &os;.org SMTP servers.</para>
|
||||
|
||||
<example xml:id="smtp-setup-local-postfix">
|
||||
<title>Using <application>Postfix</application></title>
|
||||
|
||||
<para>To tell a local Postfix instance that anything from
|
||||
<literal><replaceable>yourusername</replaceable>@FreeBSD.org</literal>
|
||||
should be forwarded to the &os;.org servers, add this to
|
||||
your <filename>main.cf</filename>:</para>
|
||||
|
||||
<programlisting>sender_dependent_relayhost_maps = hash:/usr/local/etc/postfix/relayhost_maps
|
||||
smtp_sasl_auth_enable = yes
|
||||
smtp_sasl_security_options = noanonymous
|
||||
smtp_sasl_password_maps = hash:/usr/local/etc/postfix/sasl_passwd
|
||||
smtp_use_tls = yes</programlisting>
|
||||
|
||||
<para>Create
|
||||
<filename>/usr/local/etc/postfix/relayhost_maps</filename>
|
||||
with the following content:</para>
|
||||
|
||||
<programlisting><replaceable>yourusername</replaceable>@FreeBSD.org [smtp.freebsd.org]:587</programlisting>
|
||||
|
||||
<para>Create
|
||||
<filename>/usr/local/etc/postfix/sasl_passwd</filename>
|
||||
with the following content:</para>
|
||||
|
||||
<programlisting>[smtp.freebsd.org]:587 <replaceable>yourusername</replaceable>:<replaceable>yourpassword</replaceable></programlisting>
|
||||
|
||||
<para>If the email server is used by other people, you
|
||||
may want to prevent them from sending e-mails from your
|
||||
address. To achieve this, add this to your
|
||||
<filename>main.cf</filename>:</para>
|
||||
|
||||
<programlisting>smtpd_sender_login_maps = hash:/usr/local/etc/postfix/sender_login_maps
|
||||
smtpd_sender_restrictions = reject_known_sender_login_mismatch</programlisting>
|
||||
|
||||
<para>Create
|
||||
<filename>/usr/local/etc/postfix/sender_login_maps</filename>
|
||||
with the following content:</para>
|
||||
|
||||
<programlisting><replaceable>yourusername</replaceable>@FreeBSD.org <replaceable>yourlocalusername</replaceable></programlisting>
|
||||
|
||||
<para>Where <replaceable>yourlocalusername</replaceable>
|
||||
is the <acronym>SASL</acronym> username used to connect
|
||||
to the local instance of
|
||||
<application>Postfix</application>.</para>
|
||||
</example>
|
||||
</sect4>
|
||||
</sect3>
|
||||
</sect2>
|
||||
|
||||
|
|
Loading…
Reference in a new issue