aboutsummaryrefslogtreecommitdiff
path: root/en_US.ISO8859-1/books/handbook/mail/chapter.xml
diff options
context:
space:
mode:
Diffstat (limited to 'en_US.ISO8859-1/books/handbook/mail/chapter.xml')
-rw-r--r--en_US.ISO8859-1/books/handbook/mail/chapter.xml1678
1 files changed, 798 insertions, 880 deletions
diff --git a/en_US.ISO8859-1/books/handbook/mail/chapter.xml b/en_US.ISO8859-1/books/handbook/mail/chapter.xml
index eb088d55f3..308d952042 100644
--- a/en_US.ISO8859-1/books/handbook/mail/chapter.xml
+++ b/en_US.ISO8859-1/books/handbook/mail/chapter.xml
@@ -35,38 +35,37 @@
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>
- <para>The difference between remote and
- local mailboxes.</para>
+ <para>The difference between remote and local
+ mailboxes.</para>
</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>
@@ -83,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>
@@ -109,13 +108,13 @@
<itemizedlist>
<listitem>
- <para>Properly set up your network connection
- (<xref linkend="advanced-networking"/>).</para>
+ <para>Properly set up a network connection (<xref
+ linkend="advanced-networking"/>).</para>
</listitem>
<listitem>
- <para>Properly set up the DNS information for your mail host
- (<xref linkend="network-servers"/>).</para>
+ <para>Properly set up the <acronym>DNS</acronym> information
+ for a mail host (<xref linkend="network-servers"/>).</para>
</listitem>
<listitem>
@@ -132,41 +131,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>
@@ -174,20 +174,20 @@
</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>
@@ -195,37 +195,38 @@
</listitem>
</itemizedlist>
- <para>The server daemon usually has two functions&mdash;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>
+ <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>, 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
- these problems. Optionally, install an alternative
- <acronym>MTA</acronym> from the <link linkend="ports">&os;
- Ports Collection</link>.</para>
+ <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>
</warning>
</sect2>
<sect2 id="mail-dns">
<title>Email and DNS</title>
- <para>The Domain Name System (DNS) 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
- destination. This process also occurs when mail is sent from
- a remote host to your mail server.</para>
+ <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 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 the
+ <acronym>MTA</acronym>.</para>
<indexterm>
<primary>MX record</primary>
@@ -233,18 +234,21 @@
<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">
@@ -255,33 +259,30 @@ FreeBSD.org mail is handled (pri=10) by mx1.FreeBSD.org</screen>
<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
- 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
- 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
- a <acronym>POP</acronym> or <acronym>IMAP</acronym>
- server.</para>
+ <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
+ a <acronym>MUA</acronym>, or remotely accessed and collected
+ using protocols such as <acronym>POP</acronym> or
+ <acronym>IMAP</acronym>. In order to read mail locally,
+ a <acronym>POP</acronym> or <acronym>IMAP</acronym> 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
- <acronym>IMAP</acronym> allow users to remotely access
- mailboxes, <acronym>IMAP</acronym> offers many advantages,
- some of which are:</para>
+ <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, including:</para>
<itemizedlist>
<listitem>
@@ -295,9 +296,9 @@ FreeBSD.org mail is handled (pri=10) by mx1.FreeBSD.org</screen>
</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>
@@ -311,70 +312,70 @@ FreeBSD.org mail is handled (pri=10) by mx1.FreeBSD.org</screen>
<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><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
- <acronym>POP</acronym> or <acronym>IMAP</acronym>
- server.</para>
+ <para>Where required, use the startup script that came
+ with the application to load the <acronym>POP</acronym>
+ or <acronym>IMAP</acronym> 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 tunneling sessions over
+ &man.ssh.1; (<xref linkend="security-ssh-tunneling"/>) or
+ using SSL (<xref linkend="openssl"/>).</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>
@@ -383,9 +384,8 @@ FreeBSD.org mail is handled (pri=10) by mx1.FreeBSD.org</screen>
<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>
@@ -399,22 +399,24 @@ FreeBSD.org mail is handled (pri=10) by mx1.FreeBSD.org</screen>
</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
- also accept network connections and deliver mail to local
- mailboxes or deliver it to another program.</para>
+ <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 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>
@@ -449,8 +451,8 @@ FreeBSD.org mail is handled (pri=10) by mx1.FreeBSD.org</screen>
<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>
@@ -462,33 +464,33 @@ FreeBSD.org mail is handled (pri=10) by mx1.FreeBSD.org</screen>
<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>
@@ -497,22 +499,22 @@ FreeBSD.org mail is handled (pri=10) by mx1.FreeBSD.org</screen>
<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 allowed to send mail to this host as long as the mail's
- final destination is the local machine. Hosts that are
+ 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
@@ -522,36 +524,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
- 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
+ <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 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
- 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>
+ entry allows relaying of email from hosts with an IP address
+ that begins with <hostid>128.32</hostid>. These 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>
- to update the database.</para>
+ <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>
@@ -562,72 +565,69 @@ bit.bucket: /dev/null
procmail: "|/usr/local/bin/procmail"</programlisting>
</example>
- <para>The file format is simple; 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
- <username>root</username> to the mailbox
+ <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
+ 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>
- to update the database.</para>
+ <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/local-host-names</filename></title>
<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
- 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>
+ <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>,
+ 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
- file rarely needs to be changed for standard mail
- servers.</para>
-
- <para>The master <application>sendmail</application> configuration
+ <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
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>
@@ -637,7 +637,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>
@@ -647,20 +647,19 @@ postmaster@example.com postmaster@noc.example.net
@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
- item maps <email>root@example.com</email> to the local mailbox
- <username>root</username>. The next entry maps
+ is processed in a first match order. The first item maps
+ <email>root@example.com</email> to the local mailbox
+ <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
+ <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
- <username>joe</username>.</para>
+ <hostid role="domainname">example.com</hostid> to the local
+ mailbox <username>joe</username>.</para>
</sect2>
</sect1>
@@ -678,137 +677,121 @@ postmaster@example.com postmaster@noc.example.net
<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>&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, 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
- needing a specific feature or package which relies on another
- mailer. Fortunately, whatever the reason, FreeBSD makes it
+ <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
+ <acronym>MTA</acronym>. Whatever the reason, &os; makes it
easy to make the change.</para>
<sect2>
- <title>Install a New MTA</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>
+ <title>Install a New <acronym>MTA</acronym></title>
+
+ <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
- &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
- 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,
- and never be delivered.</para>
+ <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 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 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>'
&gt;&gt; /etc/rc.conf</screen>
- <para>The MTA will now be automatically started during
- boot.</para>
+ <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
- 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
+ <para><application>Sendmail</application> is so ubiquitous as
+ standard software on &unix; systems that some 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
@@ -817,21 +800,17 @@ newaliases /usr/libexec/sendmail/sendmail
hoststat /usr/libexec/sendmail/sendmail
purgestat /usr/libexec/sendmail/sendmail</programlisting>
- <para>This means that when any of these common commands
- (such as <filename>sendmail</filename> itself) are run,
- the system actually invokes a copy of mailwrapper named
- <filename>sendmail</filename>, which checks
- <filename>mailer.conf</filename> and executes
- <filename>/usr/libexec/sendmail/sendmail</filename>
- instead. This system makes it easy to change what binaries
- are actually executed when these default
- <filename>sendmail</filename> functions are invoked.</para>
-
- <para>Therefore if you wanted
+ <para>When any of the commands listed on the left are run,
+ the system actually executes the associated command shown on
+ the right instead. This system makes it easy to change what
+ binaries are executed when these default
+ <filename>Sendmail</filename> functions are invoked.</para>
+
+ <para>As an example, to run
<filename>/usr/local/supermailer/bin/sendmail-compat</filename>
- to be run instead of <application>sendmail</application>, you
- could change <filename>/etc/mail/mailer.conf</filename> to
- read:</para>
+ instead of <application>Sendmail</application>, specify the
+ paths to the installed applications in
+ <filename>/etc/mail/mailer.conf</filename>:</para>
<programlisting>sendmail /usr/local/supermailer/bin/sendmail-compat
send-mail /usr/local/supermailer/bin/sendmail-compat
@@ -845,14 +824,12 @@ purgestat /usr/local/supermailer/bin/purgestat-compat</programlisting>
<sect2>
<title>Finishing</title>
- <para>Once you have everything configured the way you want
- it, you should either kill the
- <application>sendmail</application> processes that you
- no longer need and start the processes belonging to your
- new software, or simply reboot. Rebooting will also
- give you the opportunity to ensure that you have correctly
- configured your system to start your new MTA automatically
- on boot.</para>
+ <para>Once everything is configured, either kill the
+ unneeded <application>sendmail</application> processes and
+ start the processes belonging to the new software, or
+ reboot. Rebooting provides the opportunity to ensure that
+ the system is correctly configured to start the new
+ <acronym>MTA</acronym> automatically on boot.</para>
</sect2>
</sect1>
@@ -873,37 +850,35 @@ purgestat /usr/local/supermailer/bin/purgestat-compat</programlisting>
</question>
<answer>
- <para>You will probably find that the host is actually
- in a different domain; for example, if you are in
- <hostid role="fqdn">foo.bar.edu</hostid> and you wish
- to reach a host called <hostid>mumble</hostid> in the
- <hostid role="domainname">bar.edu</hostid> domain,
- you will have to refer to it by the fully-qualified
- domain name, <hostid
+ <para>The host may actually be in a different domain.
+ For example, in order for a host in <hostid
+ role="fqdn">foo.bar.edu</hostid> to reach a host
+ called <hostid>mumble</hostid> in the <hostid
+ role="domainname">bar.edu</hostid> domain, refer to
+ it by the Fully-Qualified Domain Name
+ <acronym>FQDN</acronym>, <hostid
role="fqdn">mumble.bar.edu</hostid>, instead of just
<hostid>mumble</hostid>.</para>
<indexterm><primary>BIND</primary></indexterm>
- <para>Traditionally, this was allowed by BSD BIND
- resolvers. However the current version of
- <application>BIND</application> that ships with
- FreeBSD no longer provides default abbreviations
- for non-fully qualified domain names other than the
- domain you are in. So an unqualified host
+ <para>This is because the version of
+ <application>BIND</application> which ships with
+ &os; no longer provides default abbreviations
+ for non-FQDNs other than the local domain. An
+ unqualified host such as
<hostid>mumble</hostid> must either be found as
<hostid role="fqdn">mumble.foo.bar.edu</hostid>,
- or it will be searched for in the root
- domain.</para>
+ or it will be searched for in the root domain.</para>
- <para>This is different from the previous behavior,
- where the search continued across <hostid
+ <para>In older versions of
+ <application>BIND</application>,
+ the search continued across <hostid
role="domainname">mumble.bar.edu</hostid>, and
- <hostid role="domainname">mumble.edu</hostid>. Have
- a look at RFC 1535 for why this was considered bad
- practice, or even a security hole.</para>
+ <hostid role="domainname">mumble.edu</hostid>. RFC
+ 1535 details why this is considered bad practice or
+ even a security hole.</para>
- <para>As a good workaround, you can place the
- line:</para>
+ <para>As a good workaround, place the line:</para>
<programlisting>search foo.bar.edu bar.edu</programlisting>
@@ -911,7 +886,7 @@ purgestat /usr/local/supermailer/bin/purgestat-compat</programlisting>
<programlisting>domain foo.bar.edu</programlisting>
- <para>into your <filename>/etc/resolv.conf</filename>.
+ <para>into <filename>/etc/resolv.conf</filename>.
However, make sure that the search order does not go
beyond the <quote>boundary between local and public
administration</quote>, as RFC 1535 calls it.</para>
@@ -920,13 +895,15 @@ purgestat /usr/local/supermailer/bin/purgestat-compat</programlisting>
<qandaentry>
<question>
- <para><application>sendmail</application> says
- <errorname>mail loops back to myself</errorname></para>
+ <para><application>Sendmail</application> says
+ <errorname>mail loops back to myself</errorname>.</para>
</question>
<answer>
- <para>This is answered in the
- <application>sendmail</application> FAQ as follows:</para>
+ <para>This is answered in the <ulink
+ url="http://www.sendmail.org/faq/">Sendmail
+ FAQ</ulink> as follows. This FAQ is recommended reading
+ when <quote>tweaking</quote> the mail setup.</para>
<programlisting>I'm getting these error messages:
@@ -943,10 +920,6 @@ itself as domain.net. Add domain.net to /etc/mail/local-host-names
(if you are using FEATURE(use_cw_file)) or add <quote>Cw domain.net</quote>
to /etc/mail/sendmail.cf.</programlisting>
- <para>The <application>sendmail</application> FAQ can be
- found at <ulink url="http://www.sendmail.org/faq/"></ulink>
- and is recommended reading if you want to do any
- <quote>tweaking</quote> of your mail setup.</para>
</answer>
</qandaentry>
@@ -957,47 +930,44 @@ to /etc/mail/sendmail.cf.</programlisting>
</question>
<answer>
- <para>You want to connect a FreeBSD box on a LAN to the
- Internet. The FreeBSD box will be a mail gateway for the
- LAN. The PPP connection is non-dedicated.</para>
+ <para>Connect to a &os; mail gateway on the LAN. The PPP
+ connection is non-dedicated.</para>
- <indexterm><primary>UUCP</primary></indexterm>
<indexterm>
<primary>MX record</primary>
</indexterm>
- <para>There are at least two ways to do this. One way is
- to use UUCP.</para>
-
- <para>Another way is to get a full-time Internet server to
- provide secondary MX services for your domain. For example,
- if your company's domain is <hostid
- role="domainname">example.com</hostid> and your Internet
- service provider has set <hostid
- role="domainname">example.net</hostid> up to provide
- secondary MX services to your domain:</para>
+ <para>One way to do this is to get a full-time Internet server
+ to provide secondary <acronym>MX</acronym> services for the
+ domain. In this example, the domain is <hostid
+ role="domainname">example.com</hostid> and the ISP has
+ configured <hostid
+ role="domainname">example.net</hostid> to provide
+ secondary <acronym>MX</acronym> services to the
+ domain:</para>
<programlisting>example.com. MX 10 example.com.
MX 20 example.net.</programlisting>
- <para>Only one host should be specified as the final recipient
- (add <literal>Cw example.com</literal> in
+ <para>Only one host should be specified as the final
+ recipient. For <application>Sendmail</application>, add
+ <literal>Cw example.com</literal> in
<filename>/etc/mail/sendmail.cf</filename> on
- <hostid role="domainname">example.com</hostid>).</para>
-
- <para>When the sending <command>sendmail</command> is trying
- to deliver the mail it will try to connect to you (<hostid
- role="domainname">example.com</hostid>) over the modem
- link. It will most likely time out because you are not
- online. The program <application>sendmail</application>
- will automatically deliver it to the secondary MX site,
- i.e., your Internet provider (<hostid
- role="domainname">example.net</hostid>). The secondary
- MX site will then periodically try to connect to
- your host and deliver the mail to the primary MX host
- (<hostid role="domainname">example.com</hostid>).</para>
-
- <para>You might want to use something like this as a login
+ <hostid role="domainname">example.com</hostid>.</para>
+
+ <para>When the sending <acronym>MTA</acronym> attempts
+ to deliver mail, it will try to connect to the system,
+ <hostid role="domainname">example.com</hostid>, over the PPP
+ link. This will time out if the destination is offline.
+ The <acronym>MTA</acronym> will automatically deliver it to
+ the secondary <acronym>MX</acronym> site at the Internet
+ Service Provider (<acronym>ISP</acronym>), <hostid
+ role="domainname">example.net</hostid>. The secondary
+ <acronym>MX</acronym> site will periodically try to connect
+ to the primary <acronym>MX</acronym> host, <hostid
+ role="domainname">example.com</hostid>.</para>
+
+ <para>Use something like this as a login
script:</para>
<programlisting>#!/bin/sh
@@ -1005,17 +975,14 @@ to /etc/mail/sendmail.cf.</programlisting>
( sleep 60 ; /usr/sbin/sendmail -q ) &amp;
/usr/sbin/ppp -direct pppmyisp</programlisting>
- <para>If you are going to create a separate login script for
- a user you could use <command>sendmail
- -qRexample.com</command> instead in the script above.
- This will force all mail in your queue for <hostid
+ <para>When creating a separate login script for users, instead
+ use <command>sendmail -qRexample.com</command> in the script
+ above. This will force all mail in the queue for <hostid
role="domainname">example.com</hostid> to be processed
immediately.</para>
- <para>A further refinement of the situation is as
- follows:</para>
-
- <para>Message stolen from the &a.isp;.</para>
+ <para>A further refinement of the situation can be seen from
+ this example from the &a.isp;:</para>
<programlisting>&gt; we provide the secondary MX for a customer. The customer connects to
&gt; our services several times a day automatically to get the mails to
@@ -1055,46 +1022,42 @@ the DNS for <quote>customer.com</quote>.</programlisting>
</question>
<answer>
- <para>In default FreeBSD installations,
- <application>sendmail</application> is configured to only
+ <para>In a default &os; installation,
+ <application>Sendmail</application> is configured to only
send mail from the host it is running on. For example,
- if a <acronym>POP</acronym> server is available, then
- users will be able to check mail from school, work, or
- other remote locations but they still will not be able
- to send outgoing emails from outside locations.
- Typically, a few moments after the attempt, an email will
- be sent from <application>MAILER-DAEMON</application>
- with a <errorname>5.7 Relaying Denied</errorname> error
- message.</para>
-
- <para>There are several ways to get around this. The most
- straightforward solution is to put your ISP's address in
- a relay-domains file at
- <filename>/etc/mail/relay-domains</filename>. A quick way
- to do this would be:</para>
+ if a <acronym>POP</acronym> server is available, users
+ will be able to check mail from remote locations but they
+ will not be able to send outgoing emails from outside
+ locations. Typically, a few moments after the attempt, an
+ email will be sent from <literal>MAILER-DAEMON</literal>
+ with a <errorname>5.7 Relaying Denied</errorname>.</para>
+
+ <para>The most straightforward solution is to add the ISP's
+ FQDN to <filename>/etc/mail/relay-domains</filename>, as
+ seen in this example:</para>
<screen>&prompt.root; <userinput>echo "your.isp.example.com" &gt; /etc/mail/relay-domains</userinput></screen>
- <para>After creating or editing this file you must restart
- <application>sendmail</application>. This works great if
- you are a server administrator and do not wish to send
- mail locally, or would like to use a point and click
- client/system on another machine or even another ISP. It
- is also very useful if you only have one or two email
- accounts set up. If there are a large number of addresses
- to add, open this file in your favorite
- text editor and then add the domains, one per line:</para>
+ <para>After creating or editing this file, restart
+ <application>Sendmail</application>. This works great if
+ the server administrator does not wish to send mail
+ locally, would like to use a <acronym>MUA</acronym> on a
+ remote machine, or would like to use another
+ <acronym>ISP</acronym> for remote connections. It is also
+ useful when there is only one or two email accounts. If
+ there are a large number of addresses, add them one per
+ line:</para>
<programlisting>your.isp.example.com
other.isp.example.net
users-isp.example.org
www.example.org</programlisting>
- <para>Now any mail sent through your system, by any host in
- this list (provided the user has an account on your
- system), will succeed. This is a very nice way to allow
- users to send mail from your system remotely without
- allowing people to send SPAM through your system.</para>
+ <para>Now any mail sent through the system by any host in
+ this list, provided the user has an account on the system,
+ will succeed. This allows users to send mail from the
+ system remotely without opening the system up to relaying
+ SPAM from the Internet.</para>
</answer>
</qandaentry>
@@ -1104,9 +1067,8 @@ www.example.org</programlisting>
<sect1 id="mail-advanced">
<title>Advanced Topics</title>
- <para>The following section covers more involved topics such as
- mail configuration and setting up mail for your entire
- domain.</para>
+ <para>This section covers more involved topics such as mail
+ configuration and setting up mail for an entire domain.</para>
<sect2 id="mail-config">
<title>Basic Configuration</title>
@@ -1116,53 +1078,49 @@ www.example.org</programlisting>
<secondary>configuration</secondary>
</indexterm>
- <para>Out of the box, you should be able to send email to
- external hosts as long as you have set up
- <filename>/etc/resolv.conf</filename> or are running your own
- name server. If you would like to have mail for your host
- delivered to the MTA (e.g.,
- <application>sendmail</application>) on your own FreeBSD host,
- there are two methods:</para>
+ <para>Out of the box, one can send email to external hosts as
+ long as <filename>/etc/resolv.conf</filename> is configured or
+ the network has access to a configured
+ <acronym>DNS</acronym> server. If order to have mail
+ delivered to the <acronym>MTA</acronym> on the &os; host,
+ do one of the following:</para>
<itemizedlist>
<listitem>
- <para>Run your own name server and have your own domain.
- For example, <hostid
- role="domainname">FreeBSD.org</hostid></para>
+ <para>Run a <acronym>DNS</acronym> server for the
+ domain.</para>
</listitem>
<listitem>
- <para>Get mail delivered directly to your host. This is
- done by delivering mail directly to the current DNS name
- for your machine. For example, <hostid
- role="fqdn">example.FreeBSD.org</hostid>.</para>
+ <para>Get mail delivered directly to to the
+ <acronym>FQDN</acronym> for the machine.</para>
</listitem>
</itemizedlist>
<indexterm><primary>SMTP</primary></indexterm>
- <para>Regardless of which of the above you choose, in order
- to have mail delivered directly to your host, it must have
- a permanent static IP address (not a dynamic address, as with
- most PPP dial-up configurations). If you are behind a
- firewall, it must pass SMTP traffic on to you. If you want
- to receive mail directly at your host, you need to be sure
- of either of two things:</para>
+ <para>In order to have mail delivered directly to a host, it
+ must have a permanent static IP address, not a dynamic IP
+ address. If the system is behind a firewall, it must be
+ configured to allow SMTP traffic. To receive mail directly at
+ a host, one of these two must be configured:</para>
<itemizedlist>
<indexterm><primary>MX record</primary></indexterm>
<listitem>
- <para>Make sure that the (lowest-numbered) MX record in
- your DNS points to your host's IP address.</para>
+ <para>Make sure that the lowest-numbered
+ <acronym>MX</acronym> record in
+ <acronym>DNS</acronym> points to the host's static IP
+ address.</para>
</listitem>
<listitem>
- <para>Make sure there is no MX entry in your DNS for your
- host.</para>
+ <para>Make sure there is no <acronym>MX</acronym> entry in
+ the <acronym>DNS</acronym> for the host.</para>
</listitem>
</itemizedlist>
- <para>Either of the above will allow you to receive mail
- directly at your host.</para>
+ <para>Either of the above will allow mail to be received
+ directly at the host.</para>
<para>Try this:</para>
@@ -1171,30 +1129,31 @@ example.FreeBSD.org
&prompt.root; <userinput>host example.FreeBSD.org</userinput>
example.FreeBSD.org has address 204.216.27.XX</screen>
- <para>If that is what you see, mail directly to
- <email role="nolink">yourlogin@example.FreeBSD.org</email>
- should work without problems (assuming
- <application>sendmail</application> is running correctly on
- <hostid role="fqdn">example.FreeBSD.org</hostid>).</para>
+ <para>In this example, mail sent directly to <email
+ role="nolink">yourlogin@example.FreeBSD.org</email>
+ should work without problems, assuming
+ <application>Sendmail</application> is running correctly on
+ <hostid role="fqdn">example.FreeBSD.org</hostid>.</para>
- <para>If instead you see something like this:</para>
+ <para>For this example:</para>
<screen>&prompt.root; <userinput>host example.FreeBSD.org</userinput>
example.FreeBSD.org has address 204.216.27.XX
example.FreeBSD.org mail is handled (pri=10) by hub.FreeBSD.org</screen>
- <para>All mail sent to your host (<hostid
- role="fqdn">example.FreeBSD.org</hostid>) will end up being
+ <para>All mail sent to <hostid
+ role="fqdn">example.FreeBSD.org</hostid> will be
collected on <hostid>hub</hostid> under the same username
instead of being sent directly to your host.</para>
- <para>The above information is handled by your DNS server.
- The DNS record that carries mail routing information is the
- <emphasis>M</emphasis>ail e<emphasis>X</emphasis>change entry.
- If no MX record exists, mail will be delivered directly to
- the host by way of its IP address.</para>
+ <para>The above information is handled by the
+ <acronym>DNS</acronym> server. The <acronym>DNS</acronym>
+ record that carries mail routing information is the
+ <acronym>MX</acronym> entry. If no <acronym>MX</acronym>
+ record exists, mail will be delivered directly to the host by
+ way of its IP address.</para>
- <para>The MX entry for <hostid
+ <para>The <acronym>MX</acronym> entry for <hostid
role="fqdn">freefall.FreeBSD.org</hostid> at one time looked
like this:</para>
@@ -1203,94 +1162,88 @@ freefall MX 40 agora.rdrop.com
freefall MX 10 freefall.FreeBSD.org
freefall MX 20 who.cdrom.com</programlisting>
- <para>As you can see, <hostid>freefall</hostid> had many MX
- entries. The lowest MX number is the host that receives mail
- directly if available; if it is not accessible for some
- reason, the others (sometimes called <quote>backup
- MXes</quote>) accept messages temporarily, and pass it
- along when a lower-numbered host becomes available,
- eventually to the lowest-numbered host.</para>
-
- <para>Alternate MX sites should have separate Internet
- connections from your own in order to be most useful. Your
- ISP or another friendly site should have no problem providing
- this service for you.</para>
+ <para><hostid>freefall</hostid> had many <acronym>MX</acronym>
+ entries. The lowest <acronym>MX</acronym> number is the host
+ that receives mail directly, if available. If it is not
+ accessible for some reason, the next lower-numbered host will
+ accept messages temporarily, and pass it along when a
+ lower-numbered host becomes available.</para>
+
+ <para>Alternate <acronym>MX</acronym> sites should have separate
+ Internet connections in order to be most useful. Your
+ <acronym>ISP</acronym> can provide this service.</para>
</sect2>
<sect2 id="mail-domain">
- <title>Mail for Your Domain</title>
+ <title>Mail for a Domain</title>
- <para>In order to set up a <quote>mailhost</quote> (aka mail
- server) you need to have any mail sent to various workstations
- directed to it. Basically, you want to <quote>claim</quote>
- any mail for any hostname in your domain (in this case <hostid
- role="fqdn">*.FreeBSD.org</hostid>) and divert it to your
- mail server so your users can receive their mail on the master
- mail server.</para>
+ <para>When configuring a <acronym>MTA</acronym> for a network,
+ any mail sent to hosts in its domain should be diverted to the
+ <acronym>MTA</acronym> so that users can receive their mail on
+ the master mail server.</para>
<indexterm><primary>DNS</primary></indexterm>
<para>To make life easiest, a user account with the same
- <emphasis>username</emphasis> should exist on both machines.
- Use &man.adduser.8; to do this.</para>
+ <emphasis>username</emphasis> should exist on both the
+ <acronym>MTA</acronym> and the system with the
+ <acronym>MUA</acronym>. Use &man.adduser.8; to create the
+ user accounts.</para>
- <para>The mailhost you will be using must be the designated mail
+ <para>The <acronym>MTA</acronym> must be the designated mail
exchanger for each workstation on the network. This is done
- in your DNS configuration like so:</para>
+ in the<acronym>DNS</acronym> configuration with an
+ <acronym>MX</acronym> record:</para>
<programlisting>example.FreeBSD.org A 204.216.27.XX ; Workstation
MX 10 hub.FreeBSD.org ; Mailhost</programlisting>
<para>This will redirect mail for the workstation to the
- mailhost no matter where the A record points. The mail is
- sent to the MX host.</para>
-
- <para>You cannot do this yourself unless you are running a DNS
- server. If you are not, or cannot run your own DNS server,
- talk to your ISP or whoever provides your DNS.</para>
-
- <para>If you are doing virtual email hosting, the following
- information will come in handy. For this example, we
- will assume you have a customer with his own domain, in this
- case <hostid role="domainname">customer1.org</hostid>, and
- you want all the mail for <hostid
- role="domainname">customer1.org</hostid> sent to your
- mailhost, <hostid role="fqdn">mail.myhost.com</hostid>. The
- entry in your DNS should look like this:</para>
+ <acronym>MTA</acronym> no matter where the A record points.
+ The mail is sent to the <acronym>MX</acronym> host.</para>
+
+ <para>This must be configured on a <acronym>DNS</acronym>
+ server. If the network does not run its own
+ <acronym>DNS</acronym> server, talk to the
+ <acronym>ISP</acronym> or <acronym>DNS</acronym>
+ provider.</para>
+
+ <para>The following is an example of virtual email hosting.
+ Consider a customer with the domain <hostid
+ role="domainname">customer1.org</hostid>, where all the mail
+ for <hostid role="domainname">customer1.org</hostid> should be
+ sent to <hostid role="fqdn">mail.myhost.com</hostid>. The
+ <acronym>DNS</acronym> entry should look like this:</para>
<programlisting>customer1.org MX 10 mail.myhost.com</programlisting>
- <para>You do <emphasis>not</emphasis> need an A record for
- <hostid role="domainname">customer1.org</hostid> if you only
- want to handle email for that domain.</para>
+ <para>An <literal>A</literal>> record is
+ <emphasis>not</emphasis> needed for <hostid
+ role="domainname">customer1.org</hostid> in order to only
+ handle email for that domain. However, running
+ <command>ping</command> against <hostid
+ role="domainname">customer1.org</hostid> will not work
+ unless an <literal>A</literal> record exists for it.</para>
- <note>
- <para>Be aware that pinging <hostid
- role="domainname">customer1.org</hostid> will not work
- unless an A record exists for it.</para>
- </note>
-
- <para>The last thing that you must do is tell
- <application>sendmail</application> on your mailhost what
- domains and/or hostnames it should be accepting mail for.
- There are a few different ways this can be done. Either of
- the following will work:</para>
+ <para>Tell the <acronym>MTA</acronym> which domains and/or
+ hostnames it should accept mail for. Either of the following
+ will work for <application>Sendmail</application>:</para>
<itemizedlist>
<listitem>
- <para>Add the hosts to your
- <filename>/etc/mail/local-host-names</filename> file if
- you are using the <literal>FEATURE(use_cw_file)</literal>.
- If you are using a version of
- <application>sendmail</application> earlier than 8.10,
- the file is <filename>/etc/sendmail.cw</filename>.</para>
+ <para>Add the hosts to
+ <filename>/etc/mail/local-host-names</filename> when
+ using the <literal>FEATURE(use_cw_file)</literal>.
+ For versions of
+ <application>Sendmail</application> earlier than 8.10,
+ edit <filename>/etc/sendmail.cw</filename> instead.</para>
</listitem>
<listitem>
- <para>Add a <literal>Cwyour.host.com</literal> line to your
- <filename>/etc/sendmail.cf</filename> or
- <filename>/etc/mail/sendmail.cf</filename> if you are
- using <application>sendmail</application> 8.10 or
- higher.</para>
+ <para>Add a <literal>Cwyour.host.com</literal> line to
+ <filename>/etc/sendmail.cf</filename>. For
+ <application>Sendmail</application> 8.10 or higher, add
+ that line to
+ <filename>/etc/mail/sendmail.cf</filename>.</para>
</listitem>
</itemizedlist>
</sect2>
@@ -1309,14 +1262,14 @@ freefall MX 20 who.cdrom.com</programlisting>
<title>Setting Up to Send Only</title>
- <para>There are many instances where you may only want to send
+ <para>There are many instances where one may only want to send
mail through a relay. Some examples are:</para>
<itemizedlist>
<listitem>
- <para>Your computer is a desktop machine, but you want
- to use programs such as &man.send-pr.1;. To do so, you
- should use your ISP's mail relay.</para>
+ <para>The computer is a desktop machine that needs to use
+ programs such as &man.send-pr.1;, using the
+ <acronym>ISP</acronym>'s mail relay.</para>
</listitem>
<listitem>
@@ -1326,28 +1279,24 @@ freefall MX 20 who.cdrom.com</programlisting>
</listitem>
</itemizedlist>
- <para>Just about any <acronym>MTA</acronym> is capable of filling
- this particular niche. Unfortunately, it can be very difficult
- to properly configure a full-featured <acronym>MTA</acronym>
- just to handle offloading mail. Programs such as
- <application>sendmail</application> and
- <application>postfix</application> are largely overkill for
- this use.</para>
+ <para>While any <acronym>MTA</acronym> is capable of filling
+ this particular niche, it can be difficult to properly configure
+ a full-featured <acronym>MTA</acronym> just to handle offloading
+ mail. Programs such as <application>Sendmail</application> and
+ <application>Postfix</application> are overkill for this
+ use.</para>
- <para>Additionally, if you are using a typical Internet access
- service, your agreement may forbid you from running a
- <quote>mail server</quote>.</para>
+ <para>Additionally, a typical Internet access service agreement
+ may forbid one from running a <quote>mail server</quote>.</para>
<para>The easiest way to fulfill those needs is to install the
- <filename role="package">mail/ssmtp</filename> port. Execute
- the following commands as <username>root</username>:</para>
+ <filename role="package">mail/ssmtp</filename> port:</para>
<screen>&prompt.root; <userinput>cd /usr/ports/mail/ssmtp</userinput>
&prompt.root; <userinput>make install replace clean</userinput></screen>
- <para>Once installed,
- <filename role="package">mail/ssmtp</filename> can be configured
- with a four-line file located at
+ <para>Once installed, <filename
+ role="package">mail/ssmtp</filename> can be configured with
<filename>/usr/local/etc/ssmtp/ssmtp.conf</filename>:</para>
<programlisting>root=yourrealemail@example.com
@@ -1355,77 +1304,76 @@ mailhub=mail.example.com
rewriteDomain=example.com
hostname=_HOSTNAME_</programlisting>
- <para>Make sure you use your real email address for
- <username>root</username>. Enter your ISP's outgoing mail relay
- in place of <hostid role="fqdn">mail.example.com</hostid>
- (some ISPs call this the <quote>outgoing mail server</quote>
- or <quote>SMTP server</quote>).</para>
+ <para>Use the real email address for <username>root</username>.
+ Enter the <acronym>ISP</acronym>'s outgoing mail relay in place
+ of <hostid role="fqdn">mail.example.com</hostid>. Some
+ <acronym>ISP</acronym>s call this the <quote>outgoing mail
+ server</quote> or <quote>SMTP server</quote>).</para>
- <para>Make sure you disable <application>sendmail</application>,
- including the outgoing mail service. See
- <xref linkend="mail-disable-sendmail"/> for details.</para>
+ <para>Make sure to disable
+ <application>Sendmail</application>, including the outgoing mail
+ service. See <xref linkend="mail-disable-sendmail"/> for
+ details.</para>
<para><filename role="package">mail/ssmtp</filename> has some
- other options available. See the example configuration file
- in <filename>/usr/local/etc/ssmtp</filename> or the manual page
- of <application>ssmtp</application> for some examples and more
- information.</para>
+ other options available. Refer to the examples in
+ <filename>/usr/local/etc/ssmtp</filename> or the manual page
+ of <application>ssmtp</application> for more information.</para>
<para>Setting up <application>ssmtp</application> in this manner
- will allow any software on your computer that needs to send
- mail to function properly, while not violating your ISP's usage
- policy or allowing your computer to be hijacked for
- spamming.</para>
+ allows any software on the computer that needs to send mail to
+ function properly, while not violating the
+ <acronym>ISP</acronym>'s usage policy or allowing the computer
+ to be hijacked for spamming.</para>
</sect1>
<sect1 id="SMTP-dialup">
<title>Using Mail with a Dialup Connection</title>
- <para>If you have a static IP address, you should not need to
- adjust anything from the defaults. Set your host name to your
- assigned Internet name and <application>sendmail</application>
+ <para>When using a static IP address, one should not need to
+ adjust the default configuration. Set the hostname to the
+ assigned Internet name and <application>Sendmail</application>
will do the rest.</para>
- <para>If you have a dynamically assigned IP number and use a
- dialup PPP connection to the Internet, you will probably have
- a mailbox on your ISPs mail server. Let's assume your ISP's
- domain is <hostid role="domainname">example.net</hostid>, and
- that your user name is <username>user</username>, you have
- called your machine <hostid role="fqdn">bsd.home</hostid>, and
- your ISP has told you that you may use <hostid
+ <para>When using a dynamically assigned IP address and a dialup
+ PPP connection to the Internet, one usually has a mailbox on the
+ <acronym>ISP</acronym>'s mail server. In this example, the
+ <acronym>ISP</acronym>'s domain is <hostid
+ role="domainname">example.net</hostid>, the user name is
+ <username>user</username>, the hostname is <hostid
+ role="fqdn">bsd.home</hostid>, and the <acronym>ISP</acronym>
+ has allowed <hostid
role="fqdn">relay.example.net</hostid> as a mail relay.</para>
- <para>In order to retrieve mail from your mailbox, you must
- install a retrieval agent. The
- <application>fetchmail</application> utility is a good choice as
- it supports many different protocols. This program is available
- as a package or from the Ports Collection (<filename
- role="package">mail/fetchmail</filename>). Usually, your
+ <para>In order to retrieve mail from the <acronym>ISP</acronym>'s
+ mailbox, install a retrieval agent from the Ports Collection.
+ <filename role="package">mail/fetchmail</filename> is a good
+ choice as it supports many different protocols. Usually, the
<acronym>ISP</acronym> will provide <acronym>POP</acronym>.
- If you are using user <acronym>PPP</acronym>, you can
- automatically fetch your mail when an Internet connection is
- established with the following entry in
+ When using user <acronym>PPP</acronym>, email can be
+ automatically fetched when an Internet connection is established
+ with the following entry in
<filename>/etc/ppp/ppp.linkup</filename>:</para>
<programlisting>MYADDR:
!bg su user -c fetchmail</programlisting>
- <para>If you are using <application>sendmail</application> (as
- shown below) to deliver mail to non-local accounts, you probably
- want to have <application>sendmail</application> process your
- mailqueue as soon as your Internet connection is established.
- To do this, put this command after the
- <command>fetchmail</command> command in
+ <para>When using <application>Sendmail</application> to deliver
+ mail to non-local accounts, configure
+ <application>Sendmail</application> to process the mail queue as
+ soon as the Internet connection is established. To do this, add
+ this line after the above <command>fetchmail</command> entry in
<filename>/etc/ppp/ppp.linkup</filename>:</para>
<programlisting> !bg su user -c "sendmail -q"</programlisting>
- <para>Assume that you have an account for
+ <para>In this example, there is an account for
<username>user</username> on <hostid
- role="fqdn">bsd.home</hostid>. In the home directory of
+ role="fqdn">bsd.home</hostid>. In the home directory of
<username>user</username> on <hostid
- role="fqdn">bsd.home</hostid>, create a
- <filename>.fetchmailrc</filename> file:</para>
+ role="fqdn">bsd.home</hostid>, create a
+ <filename>.fetchmailrc</filename> which contains this
+ line:</para>
<programlisting>poll example.net protocol pop3 fetchall pass MySecret</programlisting>
@@ -1434,11 +1382,10 @@ hostname=_HOSTNAME_</programlisting>
<literal>MySecret</literal>.</para>
<para>In order to send mail with the correct
- <literal>from:</literal> header, you must tell
- <application>sendmail</application> to use
- <email>user@example.net</email> rather than
- <email role="nolink">user@bsd.home</email>. You may also wish
- to tell <application>sendmail</application> to send all mail
+ <literal>from:</literal> header, configure
+ <application>Sendmail</application> to use
+ <email>user@example.net</email> rather than <email
+ role="nolink">user@bsd.home</email> and to send all mail
via <hostid role="fqdn">relay.example.net</hostid>, allowing
quicker mail transmission.</para>
@@ -1462,10 +1409,10 @@ Dmbsd.home
define(`confDOMAIN_NAME',`bsd.home')dnl
define(`confDELIVERY_MODE',`deferred')dnl</programlisting>
- <para>Refer to the previous section for details of how to turn
- this <filename>.mc</filename> file into a
- <filename>sendmail.cf</filename> file. Also, do not forget to
- restart <application>sendmail</application> after updating
+ <para>Refer to the previous section for details of how to convert
+ this file into the
+ <filename>sendmail.cf</filename> format. Do not forget to
+ restart <application>Sendmail</application> after updating
<filename>sendmail.cf</filename>.</para>
</sect1>
@@ -1482,33 +1429,31 @@ define(`confDELIVERY_MODE',`deferred')dnl</programlisting>
<title>SMTP Authentication</title>
- <para>Having <acronym>SMTP</acronym> Authentication in place on
- your mail server has a number of benefits.
- <acronym>SMTP</acronym> Authentication can add another layer
- of security to <application>sendmail</application>, and has
- the benefit of giving mobile users who switch hosts the ability
- to use the same mail server without the need to reconfigure
- their mail client settings each time.</para>
+ <para>Configuring <acronym>SMTP</acronym> authentication on the
+ <acronym>MTA</acronym> provides a number of benefits.
+ <acronym>SMTP</acronym> authentication adds a layer
+ of security to <application>Sendmail</application>, and provides
+ mobile users who switch hosts the ability to use the same
+ <acronym>MTA</acronym> without the need to reconfigure their
+ mail client's settings each time.</para>
<procedure>
<step>
<para>Install <filename
role="package">security/cyrus-sasl2</filename>
- from the ports. You can find this port in
- <filename role="package">security/cyrus-sasl2</filename>.
- The <filename role="package">security/cyrus-sasl2</filename>
- port supports a number of compile-time options. For the
- SMTP Authentication method we will be using here, make sure
- that the <option>LOGIN</option> option is not
- disabled.</para>
+ from the Ports Collection. This port supports a number of
+ compile-time options. For the SMTP authentication method
+ demonstrated in this example, make sure that
+ <option>LOGIN</option> is not disabled.</para>
</step>
<step>
<para>After installing <filename
role="package">security/cyrus-sasl2</filename>,
- edit <filename>/usr/local/lib/sasl2/Sendmail.conf</filename>
- (or create it if it does not exist) and add the following
+ edit
+ <filename>/usr/local/lib/sasl2/Sendmail.conf</filename>,
+ or create it if it does not exist, and add the following
line:</para>
<programlisting>pwcheck_method: saslauthd</programlisting>
@@ -1516,19 +1461,19 @@ define(`confDELIVERY_MODE',`deferred')dnl</programlisting>
<step>
<para>Next, install <filename
- role="package">security/cyrus-sasl2-saslauthd</filename>,
- edit <filename>/etc/rc.conf</filename> to add the following
- line:</para>
+ role="package">security/cyrus-sasl2-saslauthd</filename>
+ and add the following line to
+ <filename>/etc/rc.conf</filename>:</para>
<programlisting>saslauthd_enable="YES"</programlisting>
- <para>and finally start the saslauthd daemon:</para>
+ <para>Finally, start the saslauthd daemon:</para>
<screen>&prompt.root; <userinput>service saslauthd start</userinput></screen>
<para>This daemon serves as a broker for
<application>sendmail</application> to authenticate against
- your FreeBSD <filename>passwd</filename> database. This
+ the &os; &man.passwd.5; database. This
saves the trouble of creating a new set of usernames and
passwords for each user that needs to use
<acronym>SMTP</acronym> authentication, and keeps the login
@@ -1536,25 +1481,25 @@ define(`confDELIVERY_MODE',`deferred')dnl</programlisting>
</step>
<step>
- <para>Now edit <filename>/etc/make.conf</filename> and add
+ <para>Next, edit <filename>/etc/make.conf</filename> and add
the following lines:</para>
<programlisting>SENDMAIL_CFLAGS=-I/usr/local/include/sasl -DSASL
SENDMAIL_LDFLAGS=-L/usr/local/lib
SENDMAIL_LDADD=-lsasl2</programlisting>
- <para>These lines will give
- <application>sendmail</application> the proper configuration
+ <para>These lines provide
+ <application>Sendmail</application> the proper configuration
options for linking to <filename
role="package">cyrus-sasl2</filename> at compile time.
Make sure that <filename
role="package">cyrus-sasl2</filename> has been installed
before recompiling
- <application>sendmail</application>.</para>
+ <application>Sendmail</application>.</para>
</step>
<step>
- <para>Recompile <application>sendmail</application> by
+ <para>Recompile <application>Sendmail</application> by
executing the following commands:</para>
<screen>&prompt.root; <userinput>cd /usr/src/lib/libsmutil</userinput>
@@ -1564,58 +1509,55 @@ SENDMAIL_LDADD=-lsasl2</programlisting>
&prompt.root; <userinput>cd /usr/src/usr.sbin/sendmail</userinput>
&prompt.root; <userinput>make cleandir &amp;&amp; make obj &amp;&amp; make &amp;&amp; make install</userinput></screen>
- <para>The compile of <application>sendmail</application>
- should not have any problems if
- <filename>/usr/src</filename> has not been changed
- extensively and the shared libraries it needs are
+ <para>This compile should not have any problems if
+ <filename class="directory">/usr/src</filename> has not
+ changed extensively and the shared libraries it needs are
available.</para>
</step>
<step>
- <para>After <application>sendmail</application> has been
- compiled and reinstalled, edit your
- <filename>/etc/mail/freebsd.mc</filename> file (or whichever
- file you use as your <filename>.mc</filename> file. Many
- administrators choose to use the output from
- &man.hostname.1; as the <filename>.mc</filename> file for
- uniqueness). Add these lines to it:</para>
+ <para>After <application>Sendmail</application> has been
+ compiled and reinstalled, edit
+ <filename>/etc/mail/freebsd.mc</filename> or the local
+ <filename>.mc</filename> file. Many administrators choose
+ to use the output from &man.hostname.1; as the name of the
+ <filename>.mc</filename> file for uniqueness. Add these
+ lines:</para>
<programlisting>dnl set SASL options
TRUST_AUTH_MECH(`GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN')dnl
define(`confAUTH_MECHANISMS', `GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN')dnl</programlisting>
<para>These options configure the different methods available
- to <application>sendmail</application> for authenticating
- users. If you would like to use a method other than
- <application>pwcheck</application>, please see the
- included documentation.</para>
+ to <application>Sendmail</application> for authenticating
+ users. To use a method other than
+ <application>pwcheck</application>, refer to the
+ <application>Sendmail</application> documentation.</para>
</step>
<step>
- <para>Finally, run &man.make.1; while in
- <filename>/etc/mail</filename>. That will run your new
- <filename>.mc</filename> file and create a
- <filename>.cf</filename> file named
- <filename>freebsd.cf</filename> (or whatever name you have
- used for your <filename>.mc</filename> file). Then use
- the command <command>make install restart</command>, which
- will copy the file to <filename>sendmail.cf</filename>,
- and will properly restart
- <application>sendmail</application>. For more information
- about this process, you should refer to
+ <para>Finally, run &man.make.1; while in <filename
+ class="directory">/etc/mail</filename>. That will run the
+ new <filename>.mc</filename> and create a
+ <filename>.cf</filename> named either
+ <filename>freebsd.cf</filename> or the name used for the
+ local <filename>.mc</filename>. Then, run <command>make
+ install restart</command>, which will copy the file to
+ <filename>sendmail.cf</filename>, and properly restart
+ <application>Sendmail</application>. For more information
+ about this process, refer to
<filename>/etc/mail/Makefile</filename>.</para>
</step>
</procedure>
- <para>If all has gone correctly, you should be able to enter your
- login information into the mail client and send a test message.
- For further investigation, set the <option>LogLevel</option>
- of <application>sendmail</application> to 13 and watch
+ <para>To test the configuration, use a <acronym>MUA</acronym> to
+ send a test message. For further investigation, set the
+ <option>LogLevel</option> of <application>Sendmail</application>
+ to <literal>13</literal> and watch
<filename>/var/log/maillog</filename> for any errors.</para>
- <para>For more information, please see the
- <application>sendmail</application> page regarding
- <ulink url="http://www.sendmail.org/~ca/email/auth.html">
+ <para>For more information, refer to <ulink
+ url="http://www.sendmail.org/~ca/email/auth.html">
<acronym>SMTP</acronym> authentication</ulink>.</para>
</sect1>
@@ -1635,50 +1577,45 @@ define(`confAUTH_MECHANISMS', `GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN')dnl</programlis
<primary>Mail User Agents</primary>
</indexterm>
- <para>A Mail User Agent (<acronym>MUA</acronym>) is an application
- that is used to send and receive email. Furthermore, as email
- <quote>evolves</quote> and becomes more complex,
- <acronym>MUA</acronym>'s are becoming increasingly powerful
- in the way they interact with email; this gives users increased
- functionality and flexibility. &os; contains support for
- numerous mail user agents, all of which can be easily installed
- using the <link linkend="ports">FreeBSD Ports Collection</link>.
- Users may choose between graphical email clients such as
- <application>evolution</application> or
- <application>balsa</application>, console based clients such
- as <application>mutt</application>,
- <application>alpine</application> or <command>mail</command>,
- or the web interfaces used by some large organizations.</para>
+ <para>A <acronym>MUA</acronym> is an application that is used to
+ send and receive email. As email <quote>evolves</quote> and
+ becomes more complex, <acronym>MUA</acronym>s are becoming
+ increasingly powerful and provide users increased functionality
+ and flexibility. The <literal>mail</literal> category of the
+ &os; Ports Collection contains numerous <acronym>MUA</acronym>s.
+ These include graphical email clients such as
+ <application>Evolution</application> or
+ <application>Balsa</application> and console based clients such
+ as <application>mutt</application> or
+ <application>alpine</application>.</para>
<sect2 id="mail-command">
- <title>mail</title>
+ <title><command>mail</command></title>
- <para>&man.mail.1; is the default Mail User Agent
- (<acronym>MUA</acronym>) in &os;. It is a
- console based <acronym>MUA</acronym> that offers all the basic
- functionality required to send and receive text-based email,
- though it is limited in interaction abilities with attachments
- and can only support local mailboxes.</para>
+ <para>&man.mail.1; is the default
+ <acronym>MUA</acronym> installed with &os;. It is a console
+ based <acronym>MUA</acronym> that offers the basic
+ functionality required to send and receive text-based email.
+ It provides limited attachment support and can only access
+ local mailboxes.</para>
<para>Although <command>mail</command> does not natively support
interaction with <acronym>POP</acronym> or
<acronym>IMAP</acronym> servers, these mailboxes may be
- downloaded to a local <filename>mbox</filename> file using an
- application such as <application>fetchmail</application>,
- which will be discussed later in this chapter (<xref
- linkend="mail-fetchmail"/>).</para>
+ downloaded to a local <filename>mbox</filename> using an
+ application such as
+ <application>fetchmail</application>.</para>
<para>In order to send and receive email, run
<command>mail</command>:</para>
<screen>&prompt.user; <userinput>mail</userinput></screen>
- <para>The contents of the user mailbox in
- <filename class="directory">/var/mail</filename> are
- automatically read by the <command>mail</command> utility.
- Should the mailbox be empty, the utility exits with a
- message indicating that no mails could be found. Once the
- mailbox has been read, the application interface is started,
+ <para>The contents of the user's mailbox in <filename
+ class="directory">/var/mail</filename> are automatically
+ read by <command>mail</command>. Should the mailbox be empty,
+ the utility exits with a message indicating that no mail could
+ be found. If mail exists, the application interface starts,
and a list of messages will be displayed. Messages are
automatically numbered, as can be seen in the following
example:</para>
@@ -1689,10 +1626,9 @@ define(`confAUTH_MECHANISMS', `GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN')dnl</programlis
N 2 root@localhost Mon Mar 8 14:05 14/509 "user account"
N 3 root@localhost Mon Mar 8 14:05 14/509 "sample"</screen>
- <para>Messages can now be read by using the <keycap>t</keycap>
- <command>mail</command> command, suffixed by the message
- number that should be displayed. In this example, we will
- read the first email:</para>
+ <para>Messages can now be read by typing <keycap>t</keycap>
+ followed by the message number. This example reads the first
+ email:</para>
<screen>&amp; <userinput>t 1</userinput>
Message 1:
@@ -1706,23 +1642,20 @@ From: root@localhost (Charlie Root)
This is a test message, please reply if you receive it.</screen>
- <para>As can be seen in the example above, the
- <keycap>t</keycap> key will cause the message to be displayed
+ <para>As seen in this example, the message will be displayed
with full headers. To display the list of messages again,
- the <keycap>h</keycap> key should be used.</para>
+ press <keycap>h</keycap>.</para>
- <para>If the email requires a response, you may use
- <command>mail</command> to reply, by using either the
+ <para>If the email requires a reply, press either
<keycap>R</keycap> or <keycap>r</keycap>
- <command>mail</command> keys. The <keycap>R</keycap> key
- instructs <command>mail</command> to reply only to the sender
- of the email, while <keycap>r</keycap> replies not only to
- the sender, but also to other recipients of the message.
- You may also suffix these commands with the mail number which
- you would like make a reply to. Once this has been done, the
- response should be entered, and the end of the message should
- be marked by a single <keycap>.</keycap> on a new line. An
- example can be seen below:</para>
+ <command>mail</command> keys. <keycap>R</keycap> instructs
+ <command>mail</command> to reply only to the sender of the
+ email, while <keycap>r</keycap> replies to all other
+ recipients of the message. These commands can be suffixed
+ with the mail number of the message to reply to. After typing
+ the response, the end of the message should be marked by a
+ single <keycap>.</keycap> on its own line. An example can be
+ seen below:</para>
<screen>&amp; <userinput>R 1</userinput>
To: root@localhost
@@ -1732,13 +1665,13 @@ Subject: Re: test
.</userinput>
EOT</screen>
- <para>In order to send new email, the <keycap>m</keycap>
- key should be used, followed by the recipient email address.
- Multiple recipients may also be specified by separating each
- address with the <keycap>,</keycap> delimiter. The subject
- of the message may then be entered, followed by the message
- contents. The end of the message should be specified by
- putting a single <keycap>.</keycap> on a new line.</para>
+ <para>In order to send a new email, press <keycap>m</keycap>,
+ followed by the recipient email address. Multiple recipients
+ may be specified by separating each address with the
+ <keycap>,</keycap> delimiter. The subject of the message may
+ then be entered, followed by the message contents. The end of
+ the message should be specified by putting a single
+ <keycap>.</keycap> on its own line.</para>
<screen>&amp; <userinput>mail root@localhost</userinput>
Subject: <userinput>I mastered mail
@@ -1747,46 +1680,43 @@ Now I can send and receive email using mail ... :)
.</userinput>
EOT</screen>
- <para>While inside the <command>mail</command> utility, the
- <keycap>?</keycap> command may be used to display help at any
- time, the &man.mail.1; manual page should also be consulted
- for more help with <command>mail</command>.</para>
+ <para>While using <command>mail</command>, press
+ <keycap>?</keycap> to display help at any time. Refer to
+ &man.mail.1; for more help on how to use
+ <command>mail</command>.</para>
<note>
- <para>As previously mentioned, the &man.mail.1; command was
- not originally designed to handle attachments, and thus
- deals with them very poorly. Newer <acronym>MUA</acronym>s
- such as <application>mutt</application> handle attachments
- in a much more intelligent way. But should you still wish
- to use the <command>mail</command> command, the <filename
- role="package">converters/mpack</filename> port may be of
+ <para>&man.mail.1; was not designed to handle attachments and
+ thus deals with them poorly. Newer <acronym>MUA</acronym>s
+ handle attachments in a more intelligent way. Users who
+ prefer to use <command>mail</command> may find the <filename
+ role="package">converters/mpack</filename> port to be of
considerable use.</para>
</note>
</sect2>
<sect2 id="mutt-command">
- <title>mutt</title>
+ <title><application>mutt</application></title>
- <para><application>mutt</application> is a small yet very
- powerful Mail User Agent, with excellent features, just some
- of which include:</para>
+ <para><application>mutt</application> is a powerful
+ <acronym>MUA</acronym>, with many features, including:</para>
<itemizedlist>
<listitem>
- <para>The ability to thread messages;</para>
+ <para>The ability to thread messages.</para>
</listitem>
<listitem>
<para>PGP support for digital signing and encryption of
- email;</para>
+ email.</para>
</listitem>
<listitem>
- <para>MIME Support;</para>
+ <para>MIME support.</para>
</listitem>
<listitem>
- <para>Maildir Support;</para>
+ <para>Maildir support.</para>
</listitem>
<listitem>
@@ -1794,10 +1724,8 @@ EOT</screen>
</listitem>
</itemizedlist>
- <para>All of these features help to make
- <application>mutt</application> one of the most advanced mail
- user agents available. See <ulink
- url="http://www.mutt.org"></ulink> for more
+ <para>Refer to <ulink
+ url="http://www.mutt.org"></ulink> for more
information on <application>mutt</application>.</para>
<para><application>mutt</application>
@@ -1809,11 +1737,10 @@ EOT</screen>
<screen>&prompt.user; <userinput>mutt</userinput></screen>
<para><application>mutt</application> will automatically read
- the contents of the user mailbox in <filename
- class="directory">/var/mail</filename> and display the
- contents if applicable. If no mails are found in the user
- mailbox, then <application>mutt</application> will wait for
- commands from the user. The example below shows
+ and display the contents of the user mailbox in <filename
+ class="directory">/var/mail</filename>. If no mails are
+ found, <application>mutt</application> will wait for commands
+ from the user. The example below shows
<application>mutt</application> displaying a list of
messages:</para>
@@ -1823,8 +1750,8 @@ EOT</screen>
</imageobject>
</mediaobject>
- <para>In order to read an email, select it using the cursor
- keys and press the <keycap>Enter</keycap> key. An example of
+ <para>To read an email, select it using the cursor keys and
+ press <keycap>Enter</keycap>. An example of
<application>mutt</application> displaying email can be seen
below:</para>
@@ -1834,33 +1761,30 @@ EOT</screen>
</imageobject>
</mediaobject>
- <para>As with the &man.mail.1; command,
- <application>mutt</application> allows users to reply only to
- the sender of the message as well as to all recipients. To
- reply only to the sender of the email, use the
- <keycap>r</keycap> keyboard shortcut. To send a group reply,
- which will be sent to the original sender as well as all the
- message recipients, use the <keycap>g</keycap>
- shortcut.</para>
+ <para>Similar to &man.mail.1;, <application>mutt</application>
+ can be used to reply only to the sender of the message as well
+ as to all recipients. To reply only to the sender of the
+ email, press <keycap>r</keycap>. To send a group reply
+ to the original sender as well as all the message recipients,
+ press <keycap>g</keycap>.</para>
<note>
- <para><application>mutt</application> makes use of the
- &man.vi.1; command as an editor for creating and replying
- to emails. This may be customized by the user by creating
- or editing their own <filename>.muttrc</filename> file in
- their home directory and setting the
- <literal>editor</literal> variable or by setting the
- <envar>EDITOR</envar> environment variable. See
+ <para>By default, <application>mutt</application> uses the
+ &man.vi.1; editor for creating and replying to emails. Each
+ user can customize this by creating or editing the
+ <filename>.muttrc</filename> in their home directory and
+ setting the <literal>editor</literal> variable or by setting
+ the <envar>EDITOR</envar> environment variable. Refer to
<ulink url="http://www.mutt.org/"></ulink> for more
information about configuring
<application>mutt</application>.</para>
</note>
- <para>In order to compose a new mail message, press
+ <para>To compose a new mail message, press
<keycap>m</keycap>. After a valid subject has been given,
- <application>mutt</application> will start &man.vi.1; and the
- mail can be written. Once the contents of the mail are
- complete, save and quit from <command>vi</command> and
+ <application>mutt</application> will start &man.vi.1; so the
+ email can be written. Once the contents of the email are
+ complete, save and quit from <command>vi</command>.
<application>mutt</application> will resume, displaying a
summary screen of the mail that is to be delivered. In
order to send the mail, press <keycap>y</keycap>. An example
@@ -1872,30 +1796,29 @@ EOT</screen>
</imageobject>
</mediaobject>
- <para><application>mutt</application> also contains extensive
- help, which can be accessed from most of the menus by pressing
- the <keycap>?</keycap> key. The top line also displays the
- keyboard shortcuts where appropriate.</para>
+ <para><application>mutt</application> contains extensive help
+ which can be accessed from most of the menus by pressing
+ <keycap>?</keycap>. The top line also displays the keyboard
+ shortcuts where appropriate.</para>
</sect2>
<sect2 id="alpine-command">
- <title>alpine</title>
+ <title><application>alpine</application></title>
<para><application>alpine</application> is aimed at a beginner
user, but also includes some advanced features.</para>
<warning>
- <para>The <application>alpine</application> software has had
- several remote vulnerabilities discovered in the past, which
- allowed remote attackers to execute arbitrary code as users
- on the local system, by the action of sending a
- specially-prepared email. All such
- <emphasis>known</emphasis> problems have been fixed, but
- the <application>alpine</application> code is written in
- a very insecure style and the &os; Security Officer believes
- there are likely to be other undiscovered vulnerabilities.
- You install <application>alpine</application> at your own
+ <para><application>alpine</application> has had several remote
+ vulnerabilities discovered in the past, which allowed remote
+ attackers to execute arbitrary code as users on the local
+ system, by the action of sending a specially-prepared email.
+ While <emphasis>known</emphasis> problems have been fixed,
+ <application>alpine</application> code is written in an
+ insecure style and the &os; Security Officer believes there
+ are likely to be other undiscovered vulnerabilities. Users
+ install <application>alpine</application> at their own
risk.</para>
</warning>
@@ -1907,16 +1830,16 @@ EOT</screen>
<screen>&prompt.user; <userinput>alpine</userinput></screen>
- <para>The first time that <application>alpine</application>
- is run it displays a greeting page with a brief introduction,
+ <para>The first time <application>alpine</application>
+ runs, it displays a greeting page with a brief introduction,
as well as a request from the
<application>alpine</application> development team to send
an anonymous email message allowing them to judge how many
users are using their client. To send this anonymous message,
- press <keycap>Enter</keycap>, or alternatively press
+ press <keycap>Enter</keycap>. Alternatively, press
<keycap>E</keycap> to exit the greeting without sending an
- anonymous message. An example of the greeting page can be
- seen below:</para>
+ anonymous message. An example of the greeting page is
+ shown below:</para>
<mediaobject>
<imageobject>
@@ -1924,19 +1847,18 @@ EOT</screen>
</imageobject>
</mediaobject>
- <para>Users are then presented with the main menu, which can
- be easily navigated using the cursor keys. This main menu
- provides shortcuts for the composing new mails, browsing of
- mail directories, and even the administration of address book
- entries. Below the main menu, relevant keyboard shortcuts
- to perform functions specific to the task at hand are
- shown.</para>
+ <para>The main menu is then presented, which can be navigated
+ using the cursor keys. This main menu provides shortcuts for
+ the composing new mails, browsing mail directories, and
+ administering address book entries. Below the main menu,
+ relevant keyboard shortcuts to perform functions specific to
+ the task at hand are shown.</para>
<para>The default directory opened by
- <application>alpine</application> is the <filename
+ <application>alpine</application> is <filename
class="directory">inbox</filename>. To view the message
index, press <keycap>I</keycap>, or select the
- <guimenuitem>MESSAGE INDEX</guimenuitem> option as seen
+ <guimenuitem>MESSAGE INDEX</guimenuitem> option shown
below:</para>
<mediaobject>
@@ -1945,10 +1867,10 @@ EOT</screen>
</imageobject>
</mediaobject>
- <para>The message index shows messages in the current directory,
+ <para>The message index shows messages in the current directory
and can be navigated by using the cursor keys. Highlighted
- messages can be read by pressing the
- <keycap>Enter</keycap> key.</para>
+ messages can be read by pressing
+ <keycap>Enter</keycap>.</para>
<mediaobject>
<imageobject>
@@ -1957,11 +1879,11 @@ EOT</screen>
</mediaobject>
<para>In the screenshot below, a sample message is displayed by
- <application>alpine</application>. Keyboard shortcuts are
- displayed as a reference at the bottom of the screen. An
- example of one of these shortcuts is the <keycap>r</keycap>
- key, which tells the <acronym>MUA</acronym> to reply to the
- current message being displayed.</para>
+ <application>alpine</application>. Contextual keyboard
+ shortcuts are displayed at the bottom of the screen. An
+ example of one of a shortcut is <keycap>r</keycap>, which
+ tells the <acronym>MUA</acronym> to reply to the current
+ message being displayed.</para>
<mediaobject>
<imageobject>
@@ -1972,15 +1894,14 @@ EOT</screen>
<para>Replying to an email in <application>alpine</application>
is done using the <application>pico</application> editor,
which is installed by default with
- <application>alpine</application>. The
- <application>pico</application> utility makes it easy to
- navigate around the message and is slightly more forgiving
- on novice users than &man.vi.1; or &man.mail.1;. Once the
- reply is complete, the message can be sent by pressing
- <keycombo
+ <application>alpine</application>.
+ <application>pico</application> makes it easy to navigate the
+ message and is easier for novice users to use than &man.vi.1;
+ or &man.mail.1;. Once the reply is complete, the message can
+ be sent by pressing <keycombo
action="simul"><keycap>Ctrl</keycap><keycap>X</keycap>
- </keycombo>. The <application>alpine</application> application
- will ask for confirmation.</para>
+ </keycombo>. <application>alpine</application>
+ will ask for confirmation before sending the message.</para>
<mediaobject>
<imageobject>
@@ -1988,9 +1909,9 @@ EOT</screen>
</imageobject>
</mediaobject>
- <para>The <application>alpine</application> application can
- be customized using the <guimenuitem>SETUP</guimenuitem>
- option from the main menu. Consult <ulink
+ <para><application>alpine</application> can be customized using
+ the <guimenuitem>SETUP</guimenuitem> option from the main
+ menu. Consult <ulink
url="http://www.washington.edu/alpine/"></ulink>
for more information.</para>
@@ -2007,24 +1928,24 @@ EOT</screen>
</author>
</authorgroup>
</sect1info>
- <title>Using fetchmail</title>
+ <title>Using <application>fetchmail</application></title>
<indexterm>
<primary>fetchmail</primary>
</indexterm>
<para><application>fetchmail</application> is a full-featured
- <acronym>IMAP</acronym> and <acronym>POP</acronym> client which
+ <acronym>IMAP</acronym> and <acronym>POP</acronym> client. It
allows users to automatically download mail from remote
<acronym>IMAP</acronym> and <acronym>POP</acronym> servers and
- save it into local mailboxes; there it can be accessed more
+ save it into local mailboxes where it can be accessed more
easily. <application>fetchmail</application> can be installed
using the <filename role="package">mail/fetchmail</filename>
- port, and offers various features, some of which include:</para>
+ port, and offers various features, including:</para>
<itemizedlist>
<listitem>
- <para>Support of <acronym>POP3</acronym>,
+ <para>Support for the <acronym>POP3</acronym>,
<acronym>APOP</acronym>, <acronym>KPOP</acronym>,
<acronym>IMAP</acronym>, <acronym>ETRN</acronym> and
<acronym>ODMR</acronym> protocols.</para>
@@ -2042,20 +1963,18 @@ EOT</screen>
</listitem>
<listitem>
- <para>Can retrieve multiple mailboxes and forward them based
+ <para>Can retrieve multiple mailboxes and forward them, based
on configuration, to different local users.</para>
</listitem>
</itemizedlist>
- <para>While it is outside the scope of this document to explain
- all of <application>fetchmail</application>'s features, some
- basic features will be explained. The
- <application>fetchmail</application> utility requires a
- configuration file known as <filename>.fetchmailrc</filename>,
- in order to run correctly. This file includes server
- information as well as login credentials. Due to the sensitive
- nature of the contents of this file, it is advisable to make
- it readable only by the owner, with the following
+ <para>This section explains some of the basic features of
+ <application>fetchmail</application>. This utility requires a
+ <filename>.fetchmailrc</filename> configuration in the user's
+ home directory in order to run correctly. This file includes
+ server information as well as login credentials. Due to the
+ sensitive nature of the contents of this file, it is advisable
+ to make it readable only by the user, with the following
command:</para>
<screen>&prompt.user; <userinput>chmod 600 .fetchmailrc</userinput></screen>
@@ -2067,8 +1986,7 @@ EOT</screen>
role="fqdn">example.com</hostid> using a username of
<username>joesoap</username> and a password of
<literal>XXX</literal>. This example assumes that the user
- <username>joesoap</username> is also a user on the local
- system.</para>
+ <username>joesoap</username> exists on the local system.</para>
<programlisting>poll example.com protocol pop3 username "joesoap" password "XXX"</programlisting>
@@ -2082,13 +2000,13 @@ user "andrea", with password "XXXX";
poll example2.net proto imap:
user "john", with password "XXXXX", is "myth" here;</programlisting>
- <para>The <application>fetchmail</application> utility can be
- run in daemon mode by running it with the <option>-d</option>
- flag, followed by the interval (in seconds) that
- <application>fetchmail</application> should poll servers listed
- in the <filename>.fetchmailrc</filename> file. The following
- example would cause <application>fetchmail</application> to poll
- every 600 seconds:</para>
+ <para><application>fetchmail</application> can be run in daemon
+ mode by running it with <option>-d</option>, followed by the
+ interval (in seconds) that <application>fetchmail</application>
+ should poll servers listed in <filename>.fetchmailrc</filename>.
+ The following example configures
+ <application>fetchmail</application> to poll every 600
+ seconds:</para>
<screen>&prompt.user; <userinput>fetchmail -d 600</userinput></screen>
@@ -2107,47 +2025,46 @@ user "john", with password "XXXXX", is "myth" here;</programlisting>
</author>
</authorgroup>
</sect1info>
- <title>Using procmail</title>
+ <title>Using <application>procmail</application></title>
<indexterm>
<primary>procmail</primary>
</indexterm>
- <para>The <application>procmail</application> utility is an
- incredibly powerful application used to filter incoming mail.
- It allows users to define <quote>rules</quote> which can be
- matched to incoming mails to perform specific functions or to
- reroute mail to alternative mailboxes and/or email addresses.
+ <para><application>procmail</application> is a powerful
+ application used to filter incoming mail. It allows users to
+ define <quote>rules</quote> which can be matched to incoming
+ mails to perform specific functions or to reroute mail to
+ alternative mailboxes or email addresses.
<application>procmail</application> can be installed using the
<filename role="package">mail/procmail</filename> port. Once
installed, it can be directly integrated into most
- <acronym>MTA</acronym>s; consult your <acronym>MTA</acronym>
+ <acronym>MTA</acronym>s. Consult the <acronym>MTA</acronym>
documentation for more information. Alternatively,
<application>procmail</application> can be integrated by adding
the following line to a <filename>.forward</filename> in the
- home directory of the user utilizing
- <application>procmail</application> features:</para>
+ home directory of the user:</para>
<programlisting>"|exec /usr/local/bin/procmail || exit 75"</programlisting>
- <para>The following section will display some basic
+ <para>The following section displays some basic
<application>procmail</application> rules, as well as brief
- descriptions on what they do. These rules, and others must be
- inserted into a <filename>.procmailrc</filename> file, which
- must reside in the user's home directory.</para>
+ descriptions of what they do. Rules must be inserted into a
+ <filename>.procmailrc</filename>, which must reside in the
+ user's home directory.</para>
- <para>The majority of these rules can also be found in the
- &man.procmailex.5; manual page.</para>
+ <para>The majority of these rules can be found in
+ &man.procmailex.5;.</para>
- <para>Forward all mail from <email>user@example.com</email> to an
- external address of <email
+ <para>To forward all mail from <email>user@example.com</email> to
+ an external address of <email
role="nolink">goodmail@example2.com</email>:</para>
<programlisting>:0
* ^From.*user@example.com
! goodmail@example2.com</programlisting>
- <para>Forward all mails shorter than 1000 bytes to an external
+ <para>To forward all mails shorter than 1000 bytes to an external
address of <email
role="nolink">goodmail@example2.com</email>:</para>
@@ -2155,23 +2072,24 @@ user "john", with password "XXXXX", is "myth" here;</programlisting>
* &lt; 1000
! goodmail@example2.com</programlisting>
- <para>Send all mail sent to <email>alternate@example.com</email>
- into a mailbox called <filename>alternate</filename>:</para>
+ <para>To send all mail sent to
+ <email>alternate@example.com</email> to a mailbox called
+ <filename>alternate</filename>:</para>
<programlisting>:0
* ^TOalternate@example.com
alternate</programlisting>
- <para>Send all mail with a subject of <quote>Spam</quote> to
- <filename>/dev/null</filename>:</para>
+ <para>To send all mail with a subject of <quote>Spam</quote> to
+ <devicename>/dev/null</devicename>:</para>
<programlisting>:0
^Subject:.*Spam
/dev/null</programlisting>
<para>A useful recipe that parses incoming <hostid
- role="domainname">&os;.org</hostid> mailing lists
- and places each list in its own mailbox:</para>
+ role="domainname">&os;.org</hostid> mailing lists and places
+ each list in its own mailbox:</para>
<programlisting>:0
* ^Sender:.owner-freebsd-\/[^@]+@FreeBSD.ORG