Finish initial editorial review of Sendmail Configuration Files.

Comment out local-host-names for now until instructions for building its
needed .mc feature are added.

Sponsored by:	iXsystems
This commit is contained in:
Dru Lavigne 2014-05-09 20:05:33 +00:00
parent 367221a1bf
commit c15335a797
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=44803

View file

@ -383,7 +383,7 @@ FreeBSD.org mail is handled by 10 mx1.FreeBSD.org</screen>
right side of the table.</para> right side of the table.</para>
<para>Whenever this file is updated, update its database and <para>Whenever this file is updated, update its database and
restart <application>Sendmail</application>:</para> restart <application>Sendmail</application>:</para>
<screen>&prompt.root; <userinput>makemap hash /etc/mail/access &lt; /etc/mail/access</userinput> <screen>&prompt.root; <userinput>makemap hash /etc/mail/access &lt; /etc/mail/access</userinput>
&prompt.root; <userinput>service sendmail restart</userinput></screen> &prompt.root; <userinput>service sendmail restart</userinput></screen>
@ -393,47 +393,49 @@ FreeBSD.org mail is handled by 10 mx1.FreeBSD.org</screen>
<varlistentry> <varlistentry>
<term><filename>/etc/mail/aliases</filename></term> <term><filename>/etc/mail/aliases</filename></term>
<listitem> <listitem>
<para>This database contains a list of virtual mailboxes that <para>This database file contains a list of virtual mailboxes that
are expanded to other user(s), files, programs, or other are expanded to users, files, programs, or other
aliases. Here are a few examples to illustrate the aliases. Here are a few entries to illustrate the
file format:</para> file format:</para>
<example>
<title>Mail Aliases</title>
<programlisting>root: localuser <programlisting>root: localuser
ftp-bugs: joe,eric,paul ftp-bugs: joe,eric,paul
bit.bucket: /dev/null bit.bucket: /dev/null
procmail: "|/usr/local/bin/procmail"</programlisting> procmail: "|/usr/local/bin/procmail"</programlisting>
</example>
<para>The mailbox name on the left side of the colon is expanded <para>The mailbox name on the left side of the colon is expanded
to the target(s) on the right. The first entry expands the to the target(s) on the right. The first entry expands the
mailbox <systemitem class="username">root</systemitem> to the <systemitem class="username">root</systemitem> mailbox to the
mailbox <systemitem class="username">localuser</systemitem>, <systemitem class="username">localuser</systemitem> mailbox,
which is then looked up again in the which is then looked up in the
<filename>aliases</filename> database. If no match is found, <filename>/etc/mail/aliases</filename> database. If no match is found,
the message is delivered to <systemitem the message is delivered to <systemitem
class="username">localuser</systemitem>. The second entry class="username">localuser</systemitem>. The second entry
shows a mail list. Mail to the mailbox <systemitem shows a mail list. Mail to <systemitem
class="username">ftp-bugs</systemitem> is expanded to the class="username">ftp-bugs</systemitem> is expanded to the
three local mailboxes <systemitem three local mailboxes <systemitem
class="username">joe</systemitem>, <systemitem class="username">joe</systemitem>, <systemitem
class="username">eric</systemitem>, and <systemitem class="username">eric</systemitem>, and <systemitem
class="username">paul</systemitem>. A remote mailbox could class="username">paul</systemitem>. A remote mailbox could
be specified as <email>user@example.com</email>. The third be specified as <replaceable>user@example.com</replaceable>. The third
entry shows how to write mail to a file, in this case entry shows how to write mail to a file, in this case
<filename>/dev/null</filename>. The last entry demonstrates <filename>/dev/null</filename>. The last entry demonstrates
how to send mail to a program, how to send mail to a program,
<filename>/usr/local/bin/procmail</filename>, through a &unix; <filename>/usr/local/bin/procmail</filename>, through a &unix;
pipe.</para> pipe. Refer to &man.aliases.5; for more information about the
format of this file.</para>
<para>Whenever this file is updated, run <command>make</command> <para>Whenever this file is updated, run <command>newaliases</command>
in <filename>/etc/mail/</filename> to update the to update and initialize the aliases
database.</para> database.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<!--
This section needs to explain that this feature is for hosts with
alternate names, such as a host that MXs for a dynamic set of other
hosts.
It won't work unless freebsd.mc is built with FEATURE(`use_cw_file'),
meaning it needs a section to refer to on how to make mc files.
<varlistentry> <varlistentry>
<term><filename>/etc/mail/local-host-names</filename></term> <term><filename>/etc/mail/local-host-names</filename></term>
<listitem> <listitem>
@ -455,7 +457,7 @@ mail.example.com</programlisting>
restarted so that it will read the changes.</para> restarted so that it will read the changes.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
-->
<varlistentry> <varlistentry>
<term><filename>/etc/mail/sendmail.cf</filename></term> <term><filename>/etc/mail/sendmail.cf</filename></term>
<listitem> <listitem>
@ -483,34 +485,37 @@ mail.example.com</programlisting>
<varlistentry> <varlistentry>
<term><filename>/etc/mail/virtusertable</filename></term> <term><filename>/etc/mail/virtusertable</filename></term>
<listitem> <listitem>
<para>The <filename>virtusertable</filename> maps mail addresses <para>This database file maps mail addresses
for virtual domains and users to real mailboxes. These for virtual domains and users to real mailboxes. These
mailboxes can be local, remote, aliases defined in mailboxes can be local, remote, aliases defined in
<filename>/etc/mail/aliases</filename>, or files.</para> <filename>/etc/mail/aliases</filename>, or files. This allows
multiple virtual domains to be hosted on one machine.</para>
<example> <para>&os; provides a sample configuration file in
<title>Example Virtual Domain Mail Map</title> <filename>/etc/mail/virtusertable.sample</filename> to
further demonstrate its format. The following example demonstrates how
to create custom entries using that format:</para>
<programlisting>root@example.com root <programlisting>root@example.com root
postmaster@example.com postmaster@noc.example.net postmaster@example.com postmaster@noc.example.net
@example.com joe</programlisting> @example.com joe</programlisting>
</example>
<para>The above example contains a mapping for the domain <para>This file is processed in a first match order. When an
<systemitem class="fqdomainname">example.com</systemitem>. email address matches the address on the left, it is mapped to
This file is processed in a first match order. The first item the local mailbox listed on the right. The format of the first entry in
maps <email>root@example.com</email> to the local mailbox this example maps a specific email address to a local mailbox,
<systemitem class="username">root</systemitem>. The second whereas the format of the second entry maps a specific email
entry maps <email>postmaster@example.com</email> to the address to a remote mailbox. Finally, any email address
mailbox <systemitem class="username">postmaster</systemitem> from <literal>example.com</literal> which has not matched any of the previous entries
on the host <systemitem will match the last mapping and be sent to the local mailbox
class="fqdomainname">noc.example.net</systemitem>. Finally, <literal>joe</literal>. When creating custom entries, use
if nothing from <systemitem this format and add them to
class="fqdomainname">example.com</systemitem> has matched so <filename>/etc/mail/virtusertable</filename>. Whenever this
far, it will match the last mapping, which matches every other file is edited, update its database and restart
mail message addressed to someone at <systemitem <application>Sendmail</application>:</para>
class="fqdomainname">example.com</systemitem> to the local
mailbox <systemitem class="username">joe</systemitem>.</para> <screen>&prompt.root; <userinput>makemap hash /etc/mail/virtusertable &lt; /etc/mail/virtusertable</userinput>
&prompt.root; <userinput>service sendmail restart</userinput></screen>
</listitem> </listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>