Date: Mon, 15 Apr 2013 15:03:48 +0000 (UTC) From: Dru Lavigne <dru@FreeBSD.org> To: doc-committers@freebsd.org, svn-doc-projects@freebsd.org Subject: svn commit: r41433 - projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/mail Message-ID: <201304151503.r3FF3m3X060116@svn.freebsd.org>
index | next in thread | raw e-mail
Author: dru Date: Mon Apr 15 15:03:47 2013 New Revision: 41433 URL: http://svnweb.freebsd.org/changeset/doc/41433 Log: Initial patch which fixes the following. Subsequent patches will follow. - fixes &os;, e-mail, and directory tags - fixes acronyms - reworded to remove you, please, simply - inetd reference removed - modernized the host output - grammo fixes - remove non-existing ports (devel) - remove UUCP section Reviewed by: gjb (mentor) Modified: projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/mail/chapter.xml Modified: projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/mail/chapter.xml ============================================================================== --- projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/mail/chapter.xml Mon Apr 15 15:00:34 2013 (r41432) +++ projects/ISBN_1-57176-407-0/en_US.ISO8859-1/books/handbook/mail/chapter.xml Mon Apr 15 15:03:47 2013 (r41433) @@ -35,23 +35,22 @@ one of the most widely used forms of communication today. This chapter provides a basic introduction to running a mail server on &os;, as well as an introduction to sending and - receiving email using &os;; however, it is not a complete - reference and in fact many important considerations are omitted. - For more complete coverage of the subject, the reader is - referred to the many excellent books listed in + receiving email using &os;. + For more complete coverage of this subject, + refer to the books listed in <xref linkend="bibliography"/>.</para> <para>After reading this chapter, you will know:</para> <itemizedlist> <listitem> - <para>What software components are involved in sending and + <para>Which software components are involved in sending and receiving electronic mail.</para> </listitem> <listitem> <para>Where basic <application>sendmail</application> - configuration files are located in FreeBSD.</para> + configuration files are located in &os;.</para> </listitem> <listitem> @@ -60,13 +59,13 @@ </listitem> <listitem> - <para>How to block spammers from illegally using your mail + <para>How to block spammers from illegally using a mail server as a relay.</para> </listitem> <listitem> <para>How to install and configure an alternate Mail Transfer - Agent on your system, replacing + Agent, replacing <application>sendmail</application>.</para> </listitem> @@ -75,10 +74,6 @@ </listitem> <listitem> - <para>How to use SMTP with UUCP.</para> - </listitem> - - <listitem> <para>How to set up the system to send mail only.</para> </listitem> @@ -87,18 +82,18 @@ </listitem> <listitem> - <para>How to configure SMTP Authentication for added + <para>How to configure SMTP authentication for added security.</para> </listitem> <listitem> <para>How to install and use a Mail User Agent, such as - <application>mutt</application> to send and receive + <application>mutt</application>, to send and receive email.</para> </listitem> <listitem> - <para>How to download your mail from a remote + <para>How to download mail from a remote <acronym>POP</acronym> or <acronym>IMAP</acronym> server.</para> </listitem> @@ -113,18 +108,20 @@ <itemizedlist> <listitem> - <para>Properly set up your network connection - (<xref linkend="advanced-networking"/>).</para> + <para>Properly set up a <link + linkend="advanced-networking">network + connection</link>.</para> </listitem> <listitem> - <para>Properly set up the DNS information for your mail host - (<xref linkend="network-servers"/>).</para> + <para>Properly set up the <link + linkend="network-servers"><acronym>DNS</acronym> + information</link> for a mail host.</para> </listitem> <listitem> - <para>Know how to install additional third-party software - (<xref linkend="ports"/>).</para> + <para>Know how to <link linkend="ports">install additional + third-party software</link>.</para> </listitem> </itemizedlist> </sect1> @@ -136,41 +133,42 @@ <indexterm><primary>IMAP</primary></indexterm> <indexterm><primary>DNS</primary></indexterm> - <para>There are five major parts involved in an email exchange. - They are: <link linkend="mail-mua">the user program</link>, - <link linkend="mail-mta">the server daemon</link>, <link - linkend="mail-dns">DNS</link>, <link linkend="mail-receive">a - remote or local mailbox</link>, and of course, <link - linkend="mail-host">the mailhost itself</link>.</para> + <para>There are five major parts involved in an email exchange: + <link linkend="mail-mua">the Mail User Agent + <acronym>MUA></acronym></link>, <link linkend="mail-mta">the + Mail Transfer Agent<acronym>MTA</acronym></link>, <link + linkend="mail-dns"><acronym>DNS</acronym></link>, <link + linkend="mail-receive">a remote or local mailbox</link>, and + <link linkend="mail-host">the mail host</link>.</para> <sect2 id="mail-mua"> - <title>The User Program</title> + <title>The Mail User Agent</title> <para>This includes command line programs such as <application>mutt</application>, <application>alpine</application>, <application>elm</application>, and - <command>mail</command>, and <acronym>GUI</acronym> - programs such as <application>balsa</application>, - <application>xfmail</application> to name a few, and something - more <quote>sophisticated</quote> like a WWW browser. These - programs simply pass off the email transactions to the local - <link linkend="mail-host"><quote>mailhost</quote></link>, - either by calling one of the <link linkend="mail-mta">server - daemons</link> available, or delivering it over - <acronym>TCP</acronym>.</para> + <command>mail</command>, <acronym>GUI</acronym> programs such + as <application>balsa</application> or + <application>xfmail</application>, and web mail programs + which can be accessed from a web browser. User programs pass + the email transactions to the local <link + linkend="mail-host"><quote>mail host</quote></link>, either + by a <link + linkend="mail-mta"><acronym>MTA</acronym></link>, or by + delivering it over <acronym>TCP</acronym>.</para> </sect2> <sect2 id="mail-mta"> - <title>Mailhost Server Daemon</title> + <title>The Mail Transfer Agent</title> <indexterm> <primary>mail server daemons</primary> - <secondary><application>sendmail</application></secondary> + <secondary><application>Sendmail</application></secondary> </indexterm> <indexterm> <primary>mail server daemons</primary> - <secondary><application>postfix</application></secondary> + <secondary><application>Postfix</application></secondary> </indexterm> <indexterm> <primary>mail server daemons</primary> @@ -178,20 +176,22 @@ </indexterm> <indexterm> <primary>mail server daemons</primary> - <secondary><application>exim</application></secondary> + <secondary><application>Exim</application></secondary> </indexterm> - <para>&os; ships with <application>sendmail</application> by - default, but also support numerous other mail server daemons, - just some of which include:</para> + <para>&os; ships with +<application>Sendmail</application> as the default + <acronym>MTA</acronym>, but it also supports numerous other +mail server daemons, + including:</para> <itemizedlist> <listitem> - <para><application>exim</application>;</para> + <para><application>Exim</application>;</para> </listitem> <listitem> - <para><application>postfix</application>;</para> + <para><application>Postfix</application>;</para> </listitem> <listitem> @@ -199,21 +199,23 @@ </listitem> </itemizedlist> - <para>The server daemon usually has two functions—it is + <para>The <acronym>MTA</acronym> usually has two +functions. It is responsible for receiving incoming mail as well as delivering outgoing mail. It is <emphasis>not</emphasis> responsible for the collection of mail using protocols such as - <acronym>POP</acronym> or <acronym>IMAP</acronym> to read - your email, nor does it allow connecting to local - <filename>mbox</filename> or Maildir mailboxes. You may - require an additional <link - linkend="mail-receive">daemon</link> for that.</para> + <acronym>POP</acronym> or <acronym>IMAP</acronym>, nor does it +allow connecting to local + <filename>mbox</filename> or Maildir mailboxes. An additional +<link + linkend="mail-receive">daemon</link> may be required for + these functions.</para> <warning> - <para>Older versions of <application>sendmail</application> - have some serious security issues which may result in an - attacker gaining local and/or remote access to your machine. - Make sure that you are running a current version to avoid + <para>Older versions of <application>Sendmail</application> + contain serious security issues which may result in an + attacker gaining local or remote access to the system. + Run a current version to &os; to avoid these problems. Optionally, install an alternative <acronym>MTA</acronym> from the <link linkend="ports">&os; Ports Collection</link>.</para> @@ -223,13 +225,15 @@ <sect2 id="mail-dns"> <title>Email and DNS</title> - <para>The Domain Name System (DNS) and its daemon + <para>The Domain Name System (<acronym>DNS</acronym>) and its +daemon <command>named</command> play a large role in the delivery - of email. In order to deliver mail from your site to another, - the server daemon will look up the remote site in the DNS - to determine the host that will receive mail for the + of email. In order to deliver mail from one site to another, + the <acronym>MTA</acronym> will look up the remote site in +<acronym>DNS</acronym> + to determine which host will receive mail for the destination. This process also occurs when mail is sent from - a remote host to your mail server.</para> + a remote host to the <acronym>MTA</acronym>.</para> <indexterm> <primary>MX record</primary> @@ -237,18 +241,22 @@ <para><acronym>DNS</acronym> is responsible for mapping hostnames to IP addresses, as well as for storing information - specific to mail delivery, known as MX records. The MX (Mail - eXchanger) record specifies which host, or hosts, will receive - mail for a particular domain. If you do not have an MX record - for your hostname or domain, the mail will be delivered - directly to your host provided you have an A record pointing - your hostname to your IP address.</para> - - <para>You may view the MX records for any domain by using the - &man.host.1; command, as seen in the example below:</para> + specific to mail delivery, known as Mail eXchanger ++ <acronym>MX</acronym> records. The <acronym>MX</acronym> +record specifies which host, or hosts, will receive + mail for a particular domain. If there is no +<acronym>MX</acronym> record + for the hostname or domain, the mail will be delivered + directly to the host, provided there is an +<literal>A</literal> record pointing + the hostname to the IP address.</para> + + <para>To view the <acronym>MX</acronym> records for a domain, +specify the type of record using + &man.host.1;, as seen in the example below:</para> <screen>&prompt.user; <userinput>host -t mx FreeBSD.org</userinput> -FreeBSD.org mail is handled (pri=10) by mx1.FreeBSD.org</screen> +FreeBSD.org mail is handled by 10 mx1.FreeBSD.org</screen> </sect2> <sect2 id="mail-receive"> @@ -259,33 +267,33 @@ FreeBSD.org mail is handled (pri=10) by <secondary>receiving</secondary> </indexterm> - <para>Receiving mail for your domain is done by the mail host. - It will collect all mail sent to your domain and store it - either in <filename>mbox</filename> (the default method for - storing mail) or Maildir format, depending on your + <para>Receiving mail for a domain is done by the mail host. + It will collect all mail sent to the domain and store it + either in the default <filename>mbox</filename> or the +alternative Maildir format, depending on the configuration. Once mail has been stored, it may either be - read locally using applications such as &man.mail.1; or - <application>mutt</application>, or remotely accessed and + read locally using a + <acronym>MUA</acronym>, or remotely accessed and collected using protocols such as <acronym>POP</acronym> or - <acronym>IMAP</acronym>. This means that should you only - wish to read mail locally, you are not required to install + <acronym>IMAP</acronym>. In order to read mail locally, a <acronym>POP</acronym> or <acronym>IMAP</acronym> - server.</para> + server does not need to be installed.</para> <sect3 id="pop-and-imap"> - <title>Accessing remote mailboxes using <acronym>POP</acronym> + <title>Accessing Remote Mailboxes Using <acronym>POP</acronym> and <acronym>IMAP</acronym></title> <indexterm><primary>POP</primary></indexterm> <indexterm><primary>IMAP</primary></indexterm> - <para>In order to access mailboxes remotely, you are required - to have access to a <acronym>POP</acronym> or - <acronym>IMAP</acronym> server. These protocols allow users - to connect to their mailboxes from remote locations with - ease. Though both <acronym>POP</acronym> and + <para>To access mailboxes remotely, access to a +<acronym>POP</acronym> or + <acronym>IMAP</acronym> server is required. These protocols +allow users + to connect to their mailboxes from remote locations. Though +both <acronym>POP</acronym> and <acronym>IMAP</acronym> allow users to remotely access mailboxes, <acronym>IMAP</acronym> offers many advantages, - some of which are:</para> + including:</para> <itemizedlist> <listitem> @@ -299,9 +307,9 @@ FreeBSD.org mail is handled (pri=10) by </listitem> <listitem> - <para><acronym>IMAP</acronym> can be extremely useful over + <para><acronym>IMAP</acronym> can be useful over low-speed links as it allows users to fetch the - structure of messages without downloading them; it can + structure of messages without downloading them. It can also perform tasks such as searching on the server in order to minimize data transfer between clients and servers.</para> @@ -315,70 +323,74 @@ FreeBSD.org mail is handled (pri=10) by <procedure> <step> - <para>Choose an <acronym>IMAP</acronym> or - <acronym>POP</acronym> server that best suits your - needs. The following <acronym>POP</acronym> and - <acronym>IMAP</acronym> servers are well known and serve - as some good examples:</para> + <para>Use the Ports Collection to install an +<acronym>IMAP</acronym> or + <acronym>POP</acronym> server. The following +<acronym>POP</acronym> and + <acronym>IMAP</acronym> servers are well known:</para> <itemizedlist> <listitem> - <para><application>qpopper</application>;</para> + <para><filename + role="package">mail/qpopper</filename></para> </listitem> <listitem> - <para><application>teapop</application>;</para> + <para><para><filename + role="package">mail/teapop</filename></para> </listitem> <listitem> - <para><application>imap-uw</application>;</para> + <para><filename + role="package">mail/imap-uw</filename></para> </listitem> <listitem> - <para><application>courier-imap</application>;</para> + <para><filename + role="package">mail/courier-imap</filename></para> </listitem> <listitem> - <para><application>dovecot</application>;</para> + <para><filename + role="package">mail/dovecot2</filename></para> </listitem> </itemizedlist> </step> <step> - <para>Install the <acronym>POP</acronym> or - <acronym>IMAP</acronym> daemon of your choosing from - the ports collection.</para> - </step> - - <step> - <para>Where required, modify - <filename>/etc/inetd.conf</filename> to load the + <para>Where required, use the startup script that came + with the application to load the <acronym>POP</acronym> or <acronym>IMAP</acronym> - server.</para> + server. Those programs will also provide a variable + which can be added to <filename>/etc/rc.conf</filename> + to automate the startup of the application's daemon + whenever the system boots.</para> </step> </procedure> <warning> <para>It should be noted that both <acronym>POP</acronym> and <acronym>IMAP</acronym> transmit information, - including username and password credentials in clear-text. - This means that if you wish to secure the transmission - of information across these protocols, you should consider - tunneling sessions over &man.ssh.1; or using SSL. - Tunneling sessions is described in - <xref linkend="security-ssh-tunneling"/> and SSL is - described in <xref linkend="openssl"/>.</para> + including username and password credentials, in +clear-text. + To secure the transmission + of information across these protocols, consider + <link + linkend="security-ssh-tunneling">tunneling sessions over +&man.ssh.1;</link> or <link + linkend="openssl">using SSL.</link>.</para> </warning> </sect3> <sect3 id="local"> <title>Accessing Local Mailboxes</title> - <para>Mailboxes may be accessed locally by directly utilizing - <acronym>MUA</acronym>s on the server on which the mailbox - resides. This can be done using applications such as - <application>mutt</application> or &man.mail.1;.</para> + <para>Mailboxes may be accessed locally by directly using an + <acronym>MUA</acronym> on the server on which the mailbox + resides. This can be done using a built-in application +such as &man.mail.1; or by installing a + <acronym>MUA</acronym> from the Ports Collection..</para> </sect3> </sect2> @@ -387,9 +399,9 @@ FreeBSD.org mail is handled (pri=10) by <indexterm><primary>mail host</primary></indexterm> - <para>The mail host is the name given to a server that is - responsible for delivering and receiving mail for your host, - and possibly your network.</para> + <para>The mail host is a server that is + responsible for delivering and receiving mail for a host, + or a network.</para> </sect2> </sect1> @@ -403,22 +415,24 @@ FreeBSD.org mail is handled (pri=10) by </author> </authorgroup> </sect1info> - <title><application>sendmail</application> Configuration</title> + <title><application>Sendmail</application> Configuration</title> <indexterm> - <primary><application>sendmail</application></primary> + <primary><application>Sendmail</application></primary> </indexterm> - <para>&man.sendmail.8; is the default Mail Transfer Agent (MTA) - in FreeBSD. <application>sendmail</application>'s job is to - accept mail from Mail User Agents (<acronym>MUA</acronym>) and - deliver it to the appropriate mailer as defined by its - configuration file. <application>sendmail</application> can + <para>&man.sendmail.8; is the default <acronym>MTA</acronym> + which is installed with &os;. +<application>Sendmail</application> + accepts mail from <acronym>MUA</acronym>s and + delivers it to the appropriate mailer as defined by its + configuration file. <application>Sendmail</application> can also accept network connections and deliver mail to local - mailboxes or deliver it to another program.</para> + mailboxes or to another program.</para> - <para><application>sendmail</application> uses the following - configuration files:</para> + <para><application>Sendmail</application> uses the following + configuration files. This section describes these files in more + detail.</para> <indexterm> <primary><filename>/etc/mail/access</filename></primary> @@ -453,8 +467,8 @@ FreeBSD.org mail is handled (pri=10) by <row> <entry> <filename>/etc/mail/access</filename></entry> - <entry><application>sendmail</application> access database - file</entry> + <entry><application>Sendmail</application> access database + file.</entry> </row> <row> @@ -466,33 +480,33 @@ FreeBSD.org mail is handled (pri=10) by <row> <entry> <filename>/etc/mail/local-host-names</filename></entry> - <entry>Lists of hosts <application>sendmail</application> - accepts mail for</entry> + <entry>Lists of hosts <application>Sendmail</application> + accepts mail for.</entry> </row> <row> <entry> <filename>/etc/mail/mailer.conf</filename></entry> - <entry>Mailer program configuration</entry> + <entry>Mailer program configuration.</entry> </row> <row> <entry> <filename>/etc/mail/mailertable</filename></entry> - <entry>Mailer delivery table</entry> + <entry>Mailer delivery table.</entry> </row> <row> <entry> <filename>/etc/mail/sendmail.cf</filename></entry> - <entry><application>sendmail</application> master - configuration file</entry> + <entry><application>Sendmail</application> master + configuration file.</entry> </row> <row> <entry> <filename>/etc/mail/virtusertable</filename></entry> - <entry>Virtual users and domain tables</entry> + <entry>Virtual users and domain tables.</entry> </row> </tbody> </tgroup> @@ -501,22 +515,23 @@ FreeBSD.org mail is handled (pri=10) by <sect2> <title><filename>/etc/mail/access</filename></title> - <para>The access database defines what host(s) or IP addresses + <para>This database defines which host(s) or IP addresses have access to the local mail server and what kind of access they have. Hosts can be listed as <option>OK</option>, - <option>REJECT</option>, <option>RELAY</option> or simply - passed to <application>sendmail</application>'s error + <option>REJECT</option>, or <option>RELAY</option>, or can be + passed to <application>Sendmail</application>'s error handling routine with a given mailer error. Hosts that - are listed as <option>OK</option>, which is the default, + are listed as <option>OK</option>, which is the default +option, are allowed to send mail to this host as long as the mail's final destination is the local machine. Hosts that are listed as <option>REJECT</option> are rejected for all mail - connections. Hosts that have the <option>RELAY</option> - option for their hostname are allowed to send mail for any - destination through this mail server.</para> + connections. Hosts that are listed as <option>RELAY</option> + are allowed to send mail for any + destination using this mail server.</para> <example> - <title>Configuring the <application>sendmail</application> + <title>Configuring the <application>Sendmail</application> Access Database</title> <programlisting>cyberspammer.com 550 We do not accept mail from spammers @@ -526,36 +541,37 @@ okay.cyberspammer.com OK 128.32 RELAY</programlisting> </example> - <para>In this example we have five entries. Mail senders that - match the left hand side of the table are affected by the + <para>This example shows five entries. Mail senders that + match the left side of the table are affected by the action on the right side of the table. The first two examples - give an error code to <application>sendmail</application>'s - error handling routine. The message is printed to the remote - host when a mail matches the left hand side of the table. - The next entry rejects mail from a specific host on the - Internet, <hostid>another.source.of.spam</hostid>. The next - entry accepts mail connections from a host <hostid + give an error code to <application>Sendmail</application>'s + error handling routine. The message is sent to the remote + host when a mail matches the left side of the table. + The third entry rejects mail from a specific host on the + Internet, <hostid>another.source.of.spam</hostid>. The fourth + entry accepts mail connections from <hostid role="fqdn">okay.cyberspammer.com</hostid>, which is - more exact than the <hostid + more specific than the <hostid role="domainname">cyberspammer.com</hostid> line above. More specific matches override less exact matches. The last - entry allows relaying of electronic mail from hosts with an + entry allows relaying of email from hosts with an IP address that begins with <hostid>128.32</hostid>. These - hosts would be able to send mail through this mail server - that are destined for other mail servers.</para> + hosts can send mail through this mail server + that is destined for other mail servers.</para> - <para>When this file is updated, you need to run - <command>make</command> in <filename>/etc/mail/</filename> + <para>Whenever this file is updated, run + <command>make</command> in <filename +class="directory">/etc/mail/</filename> to update the database.</para> </sect2> <sect2> <title><filename>/etc/mail/aliases</filename></title> - <para>The aliases database contains a list of virtual mailboxes - that are expanded to other user(s), files, programs or other - aliases. Here are a few examples that can be used in - <filename>/etc/mail/aliases</filename>:</para> + <para>This database contains a list of virtual mailboxes + that are expanded to other user(s), files, programs, or other + aliases. Here are a few examples to illustrate the +file format:</para> <example> <title>Mail Aliases</title> @@ -566,28 +582,29 @@ bit.bucket: /dev/null procmail: "|/usr/local/bin/procmail"</programlisting> </example> - <para>The file format is simple; the mailbox name on the left + <para>The mailbox name on the left side of the colon is expanded to the target(s) on the right. - The first example expands the mailbox + The first entry expands the mailbox <username>root</username> to the mailbox <username>localuser</username>, which is then looked up again - in the aliases database. If no match is found, then the - message is delivered to the local user - <username>localuser</username>. The next example shows a + in the <filename>aliases</filename> database. If no match is +found, the + message is delivered to + <username>localuser</username>. The second entry shows a mail list. Mail to the mailbox <username>ftp-bugs</username> is expanded to the three local mailboxes <username>joe</username>, <username>eric</username>, and - <username>paul</username>. Note that a remote mailbox could - be specified as <email>user@example.com</email>. The next - example shows writing mail to a file, in this case - <filename>/dev/null</filename>. The last example shows - sending mail to a program, in this case the mail message is - written to the standard input of - <filename>/usr/local/bin/procmail</filename> through a &unix; + <username>paul</username>. A remote mailbox could + be specified as <email>user@example.com</email>. The third + entry shows how to write mail to a file, in this case + <filename>/dev/null</filename>. The last entry demonstrates + how to send mail to a program, + <filename>/usr/local/bin/procmail</filename>, through a &unix; pipe.</para> - <para>When this file is updated, you need to run - <command>make</command> in <filename>/etc/mail/</filename> + <para>Whenever this file is updated, run + <command>make</command> in <filename +class="directory">/etc/mail/</filename> to update the database.</para> </sect2> <sect2> @@ -595,43 +612,44 @@ procmail: "|/usr/local/bin/procmail"</pr <para>This is a list of hostnames &man.sendmail.8; is to accept as the local host name. Place any domains or hosts that - <application>sendmail</application> is to be receiving mail - for. For example, if this mail server was to accept mail for + <application>Sendmail</application> will receive mail + for. For example, to configure a mail server to accept +mail for the domain <hostid role="domainname">example.com</hostid> and - the host <hostid role="fqdn">mail.example.com</hostid>, its - <filename>local-host-names</filename> might look something - like this:</para> + the host <hostid role="fqdn">mail.example.com</hostid>, add +these entries to + <filename>local-host-names</filename>:</para> <programlisting>example.com mail.example.com</programlisting> - <para>When this file is updated, &man.sendmail.8; needs to be - restarted to read the changes.</para> + <para>Whenever this file is updated, &man.sendmail.8; needs to be + restarted so that it will read the changes.</para> </sect2> <sect2> <title><filename>/etc/mail/sendmail.cf</filename></title> - <para><application>sendmail</application>'s master configuration - file, <filename>sendmail.cf</filename> controls the overall - behavior of <application>sendmail</application>, including - everything from rewriting e-mail addresses to printing rejection - messages to remote mail servers. Naturally, with such a diverse - role, this configuration file is quite complex and its details - are a bit out of the scope of this section. Fortunately, this + <para>This is the master +configuration file for <application>Sendmail</application>. It +controls the overall + behavior of <application>Sendmail</application>, including + everything from rewriting email addresses to printing rejection + messages to remote mail servers. Accordingly, this +configuration file is quite complex. Fortunately, this file rarely needs to be changed for standard mail servers.</para> - <para>The master <application>sendmail</application> configuration + <para>The master <application>Sendmail</application> configuration file can be built from &man.m4.1; macros that define the - features and behavior of <application>sendmail</application>. - Please see + features and behavior of <application>Sendmail</application>. + Refer to <filename>/usr/src/contrib/sendmail/cf/README</filename> for some of the details.</para> - <para>When changes to this file are made, - <application>sendmail</application> needs to be restarted for + <para>Whenever changes to this file are made, + <application>Sendmail</application> needs to be restarted for the changes to take effect.</para> </sect2> @@ -641,7 +659,7 @@ mail.example.com</programlisting> <para>The <filename>virtusertable</filename> maps mail addresses for virtual domains and mailboxes to real mailboxes. These mailboxes can be local, remote, aliases defined in - <filename>/etc/mail/aliases</filename> or files.</para> + <filename>/etc/mail/aliases</filename>, or files.</para> <example> <title>Example Virtual Domain Mail Map</title> @@ -651,19 +669,19 @@ postmaster@example.com postmast @example.com joe</programlisting> </example> - <para>In the above example, we have a mapping for a domain + <para>The above example contains a mapping for the domain <hostid role="domainname">example.com</hostid>. This file - is processed in a first match order down the file. The first + is processed in a first match order. The first item maps <email>root@example.com</email> to the local mailbox - <username>root</username>. The next entry maps + <username>root</username>. The second entry maps <email>postmaster@example.com</email> to the mailbox <username>postmaster</username> on the host <hostid role="fqdn">noc.example.net</hostid>. Finally, if nothing from <hostid role="domainname">example.com</hostid> has matched so far, it will match the last mapping, which matches every other mail message addressed to someone at - <hostid role="domainname">example.com</hostid>. This will - be mapped to the local mailbox + <hostid role="domainname">example.com</hostid> to the local +mailbox <username>joe</username>.</para> </sect2> @@ -682,137 +700,134 @@ postmaster@example.com postmast <author> <firstname>Gregory</firstname> <surname>Neil Shapiro</surname> - <contrib>Information taken from e-mails written + <contrib>Information taken from emails written by</contrib> </author> </authorgroup> </sect1info> - <title>Changing Your Mail Transfer Agent</title> + <title>Changing the Mail Transfer Agent</title> <indexterm> <primary>email</primary> <secondary>change mta</secondary> </indexterm> - <para>As already mentioned, FreeBSD comes with - <application>sendmail</application> already installed as your - MTA (Mail Transfer Agent). Therefore by default it is - in charge of your outgoing and incoming mail.</para> - - <para>However, for a variety of reasons, some system - administrators want to change their system's MTA. These - reasons range from merely wanting to try out another MTA to + <para>&os; comes with + <application>Sendmail</application> already installed as the + <acronym>MTA</acronym> which is + in charge of outgoing and incoming mail.</para> + + <para>However, the system + administrator can change the system's <acronym>MTA</acronym>. +The + reasons for doing so range from wanting to try out +another <acronym>MTA</acronym> to needing a specific feature or package which relies on another - mailer. Fortunately, whatever the reason, FreeBSD makes it + <acronym>MTA</acronym>. Whatever the reason, +&os; makes it easy to make the change.</para> <sect2> - <title>Install a New MTA</title> + <title>Install a New <acronym>MTA</acronym></title> - <para>You have a wide choice of MTAs available. A good - starting point is the - <link linkend="ports">FreeBSD Ports Collection</link> where - you will be able to find many. Of course you are free to use - any MTA you want from any location, as long as you can make - it run under FreeBSD.</para> - - <para>Start by installing your new MTA. Once it is installed - it gives you a chance to decide if it really fulfills your - needs, and also gives you the opportunity to configure your - new software before getting it to take over from - <application>sendmail</application>. When doing this, you - should be sure that installing the new software will not - attempt to overwrite system binaries such as - <filename>/usr/bin/sendmail</filename>. Otherwise, your new - mail software has essentially been put into service before - you have configured it.</para> - - <para>Please refer to your chosen MTA's documentation for - information on how to configure the software you have - chosen.</para> + <para>A wide choice of <acronym>MTA</acronym>s is available +from the <literal>mail</literal> category of the + <link linkend="ports">&os; Ports Collection</link>.</para> + + <para>Once a new <acronym>MTA</acronym> is installed, +configure the + new software and decide if it really fulfills your needs + before replacing <application>Sendmail</application>.</para> + + <para>Refer to the new chosen <acronym>MTA</acronym>'s +documentation for + information on how to configure the software.</para> </sect2> <sect2 id="mail-disable-sendmail"> - <title>Disable <application>sendmail</application></title> + <title>Disable <application>Sendmail</application></title> <warning> - <para>If you disable <application>sendmail</application>'s - outgoing mail service, it is important that you replace it - with an alternative mail delivery system. If - you choose not to, system functions such as + <para>If <application>Sendmail</application>'s + outgoing mail service is disabled, it is important that it +is replaced + with an alternative mail delivery system. Otherwise, system +functions such as &man.periodic.8; will be unable to deliver their results - by e-mail as they would normally expect to. Many parts of - your system may expect to have a functional - <application>sendmail</application>-compatible system. If + by email. Many parts of + the system expect a functional + <acronym>MTA</acronym>. If applications continue to use - <application>sendmail</application>'s binaries to try to - send e-mail after you have disabled them, mail could go - into an inactive <application>sendmail</application> queue, + <application>Sendmail</application>'s binaries to try to + send email they are disabled, mail could go + into an inactive <application>Sendmail</application> queue, and never be delivered.</para> </warning> <para>In order to completely disable - <application>sendmail</application>, including the outgoing - mail service, you must use</para> + <application>Sendmail</application>, including the outgoing + mail service, add or edit the following lines in + <filename>/etc/rc.conf</filename>:</para> <programlisting>sendmail_enable="NO" sendmail_submit_enable="NO" sendmail_outbound_enable="NO" sendmail_msp_queue_enable="NO"</programlisting> - <para>in <filename>/etc/rc.conf.</filename></para> - - <para>If you only want to disable - <application>sendmail</application>'s incoming mail service, - you should set</para> + <para>To only disable + <application>Sendmail</application>'s incoming mail service, + set</para> <programlisting>sendmail_enable="NO"</programlisting> <para>in <filename>/etc/rc.conf</filename>. More information - on <application>sendmail</application>'s startup options - is available from the &man.rc.sendmail.8; manual - page.</para> + on <application>Sendmail</application>'s startup options + is available in &man.rc.sendmail.8;.</para> </sect2> <sect2> - <title>Running Your New MTA on Boot</title> + <title>Running the New <acronym>MTA</acronym> on Boot</title> - <para>The new MTA can be started during boot by adding a - configuration line to <filename>/etc/rc.conf</filename> - like the following example for postfix:</para> + <para>The new <acronym>MTA</acronym> can be started during +boot by adding a + configuration line to <filename>/etc/rc.conf</filename>. + This example enables the + Postfix <acronym>MTA</acronym>:</para> <screen>&prompt.root; echo '<replaceable>postfix</replaceable>_enable=<quote>YES</quote>' >> /etc/rc.conf</screen> - <para>The MTA will now be automatically started during + <para>The specified <acronym>MTA</acronym> will now be +automatically started during boot.</para> </sect2> <sect2> - <title>Replacing <application>sendmail</application> as + <title>Replacing <application>Sendmail</application> as the System's Default Mailer</title> - <para>The program <application>sendmail</application> is so + <para><application>Sendmail</application> is so ubiquitous as standard software on &unix; systems that some - software just assumes it is already installed and configured. - For this reason, many alternative MTA's provide their own + software assumes it is already installed and configured. + For this reason, many alternative <acronym>MTA</acronym>s +provide their own compatible implementations of the - <application>sendmail</application> command-line interface; - this facilitates using them as <quote>drop-in</quote> - replacements for <application>sendmail</application>.</para> - - <para>Therefore, if you are using an alternative mailer, - you will need to make sure that software trying to execute - standard <application>sendmail</application> binaries such as - <filename>/usr/bin/sendmail</filename> actually executes - your chosen mailer instead. Fortunately, FreeBSD provides - a system called &man.mailwrapper.8; that does this job for - you.</para> - - <para>When <application>sendmail</application> is operating - as installed, you will find something like the following - in <filename>/etc/mail/mailer.conf</filename>:</para> + <application>Sendmail</application> command-line interface in +order to + facilitate using them as <quote>drop-in</quote> + replacements for <application>Sendmail</application>.</para> + + <para>When using an alternative <acronym>MTA</acronym>, + make sure that software trying to execute + standard <application>Sendmail</application> binaries, such as + <filename>/usr/bin/sendmail</filename>, actually execute + the chosen mailer instead. Fortunately, &os; provides + a system called &man.mailwrapper.8; for this purpose.</para> + + <para>When <application>Sendmail</application> is operating + as installed, +<filename>/etc/mail/mailer.conf</filename> will look like this:</para> <programlisting>sendmail /usr/libexec/sendmail/sendmail send-mail /usr/libexec/sendmail/sendmail @@ -821,21 +836,19 @@ newaliases /usr/libexec/sendmail/sendmai hoststat /usr/libexec/sendmail/sendmail purgestat /usr/libexec/sendmail/sendmail</programlisting> *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304151503.r3FF3m3X060116>
