Date: Tue, 12 Feb 2013 14:40:47 +0000 (UTC) From: Dru Lavigne <dru@FreeBSD.org> To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r40957 - head/en_US.ISO8859-1/books/handbook/mail Message-ID: <201302121440.r1CEelue065501@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dru Date: Tue Feb 12 14:40:47 2013 New Revision: 40957 URL: http://svnweb.freebsd.org/changeset/doc/40957 Log: White space fix only. Translators can ignore. Approved by: gjb (mentor) Modified: head/en_US.ISO8859-1/books/handbook/mail/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/mail/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/mail/chapter.xml Tue Feb 12 09:42:23 2013 (r40956) +++ head/en_US.ISO8859-1/books/handbook/mail/chapter.xml Tue Feb 12 14:40:47 2013 (r40957) @@ -28,43 +28,46 @@ <sect1 id="mail-synopsis"> <title>Synopsis</title> + <indexterm><primary>email</primary></indexterm> - <para><quote>Electronic Mail</quote>, better known as email, is 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 <xref linkend="bibliography"/>.</para> + <para><quote>Electronic Mail</quote>, better known as email, is + 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 + <xref linkend="bibliography"/>.</para> <para>After reading this chapter, you will know:</para> <itemizedlist> <listitem> - <para>What software components are involved in sending and receiving - electronic mail.</para> + <para>What 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> + <para>Where basic <application>sendmail</application> + configuration files are located in FreeBSD.</para> </listitem> <listitem> - <para>The difference between remote and + <para>The difference between remote and local mailboxes.</para> </listitem> <listitem> - <para>How to block spammers from illegally using your mail server as a - relay.</para> + <para>How to block spammers from illegally using your mail + server as a relay.</para> </listitem> <listitem> - <para>How to install and configure an alternate Mail Transfer Agent on - your system, replacing <application>sendmail</application>.</para> + <para>How to install and configure an alternate Mail Transfer + Agent on your system, replacing + <application>sendmail</application>.</para> </listitem> <listitem> @@ -84,22 +87,24 @@ </listitem> <listitem> - <para>How to configure SMTP Authentication for added security.</para> + <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 email.</para> + <para>How to install and use a Mail User Agent, such as + <application>mutt</application> to send and receive + email.</para> </listitem> <listitem> - - <para>How to download your mail from a remote <acronym>POP</acronym> - or <acronym>IMAP</acronym> server.</para> + <para>How to download your mail from a remote + <acronym>POP</acronym> or <acronym>IMAP</acronym> + server.</para> </listitem> <listitem> - <para>How to automatically apply filters and rules to incoming + <para>How to automatically apply filters and rules to incoming email.</para> </listitem> </itemizedlist> @@ -119,56 +124,61 @@ <listitem> <para>Know how to install additional third-party software - (<xref linkend="ports"/>).</para></listitem> + (<xref linkend="ports"/>).</para> + </listitem> </itemizedlist> </sect1> <sect1 id="mail-using"> <title>Using Electronic Mail</title> + <indexterm><primary>POP</primary></indexterm> <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. + 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> <sect2 id="mail-mua"> <title>The User Program</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>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> - </sect2> + <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> + </sect2> <sect2 id="mail-mta"> <title>Mailhost Server Daemon</title> + <indexterm> - <primary>mail server daemons</primary> - <secondary><application>sendmail</application></secondary> + <primary>mail server daemons</primary> + <secondary><application>sendmail</application></secondary> </indexterm> <indexterm> - <primary>mail server daemons</primary> - <secondary><application>postfix</application></secondary> + <primary>mail server daemons</primary> + <secondary><application>postfix</application></secondary> </indexterm> <indexterm> - <primary>mail server daemons</primary> - <secondary><application>qmail</application></secondary> + <primary>mail server daemons</primary> + <secondary><application>qmail</application></secondary> </indexterm> <indexterm> - <primary>mail server daemons</primary> - <secondary><application>exim</application></secondary> + <primary>mail server daemons</primary> + <secondary><application>exim</application></secondary> </indexterm> <para>&os; ships with <application>sendmail</application> by @@ -189,14 +199,15 @@ </listitem> </itemizedlist> - <para>The server daemon usually has two functions—it is responsible - for receiving incoming mail as well as delivering outgoing mail. It is - <emphasis>not</emphasis> responsible for the collection of mail using protocols - such as <acronym>POP</acronym> or <acronym>IMAP</acronym> to - read your email, nor does it allow connecting to local - <filename>mbox</filename> or Maildir mailboxes. You may require - an additional <link linkend="mail-receive">daemon</link> for - that.</para> + <para>The server daemon usually has two functions—it is + responsible for receiving incoming mail as well as delivering + outgoing mail. It is <emphasis>not</emphasis> responsible + for the collection of mail using protocols such as + <acronym>POP</acronym> or <acronym>IMAP</acronym> to read + your email, nor does it allow connecting to local + <filename>mbox</filename> or Maildir mailboxes. You may + require an additional <link + linkend="mail-receive">daemon</link> for that.</para> <warning> <para>Older versions of <application>sendmail</application> @@ -205,7 +216,7 @@ 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> + Ports Collection</link>.</para> </warning> </sect2> @@ -213,12 +224,12 @@ <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> + <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> <indexterm> <primary>MX record</primary> @@ -242,149 +253,154 @@ FreeBSD.org mail is handled (pri=10) by <sect2 id="mail-receive"> <title>Receiving Mail</title> + <indexterm> - <primary>email</primary> - <secondary>receiving</secondary> + <primary>email</primary> + <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 + <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> + 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> <sect3 id="pop-and-imap"> - <title>Accessing remote mailboxes using <acronym>POP</acronym> and <acronym>IMAP</acronym></title> + <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> - - <itemizedlist> - <listitem> - <para><acronym>IMAP</acronym> can store messages on a remote - server as well as fetch them.</para> - </listitem> - - <listitem> - <para><acronym>IMAP</acronym> supports concurrent updates.</para> - </listitem> + <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> + + <itemizedlist> + <listitem> + <para><acronym>IMAP</acronym> can store messages on a + remote server as well as fetch them.</para> + </listitem> + + <listitem> + <para><acronym>IMAP</acronym> supports concurrent + updates.</para> + </listitem> - <listitem> + <listitem> <para><acronym>IMAP</acronym> can be extremely useful over - low-speed links as it allows users to fetch the structure - of messages without downloading them; it can also - perform tasks such as searching on the server in + low-speed links as it allows users to fetch the + 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> - </listitem> + </listitem> - </itemizedlist> + </itemizedlist> - <para>In order to install a <acronym>POP</acronym> or - <acronym>IMAP</acronym> server, the following steps should be - performed:</para> + <para>In order to install a <acronym>POP</acronym> or + <acronym>IMAP</acronym> server, the following steps should + be performed:</para> - <procedure> + <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>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> - <itemizedlist> - <listitem> - <para><application>qpopper</application>;</para> - </listitem> - - <listitem> - <para><application>teapop</application>;</para> - </listitem> - - <listitem> - <para><application>imap-uw</application>;</para> - </listitem> - - <listitem> - <para><application>courier-imap</application>;</para> - </listitem> - - <listitem> - <para><application>dovecot</application>;</para> - </listitem> - </itemizedlist> + <itemizedlist> + <listitem> + <para><application>qpopper</application>;</para> + </listitem> + + <listitem> + <para><application>teapop</application>;</para> + </listitem> + + <listitem> + <para><application>imap-uw</application>;</para> + </listitem> + + <listitem> + <para><application>courier-imap</application>;</para> + </listitem> + + <listitem> + <para><application>dovecot</application>;</para> + </listitem> + </itemizedlist> </step> - <step> + <step> <para>Install the <acronym>POP</acronym> or - <acronym>IMAP</acronym> daemon of your choosing from the - ports - collection.</para> + <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, modify + <filename>/etc/inetd.conf</filename> to load the + <acronym>POP</acronym> or <acronym>IMAP</acronym> + server.</para> </step> - </procedure> + </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 + <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> - </warning> + </warning> </sect3> <sect3 id="local"> - <title>Accessing Local Mailboxes</title> + <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> + <application>mutt</application> or &man.mail.1;.</para> </sect3> </sect2> <sect2 id="mail-host"> <title>The Mail Host</title> + <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> + responsible for delivering and receiving mail for your host, + and possibly your network.</para> </sect2> </sect1> <sect1 id="sendmail"> <sect1info> <authorgroup> - <author> - <firstname>Christopher</firstname> - <surname>Shumway</surname> - <contrib>Contributed by </contrib> - </author> + <author> + <firstname>Christopher</firstname> + <surname>Shumway</surname> + <contrib>Contributed by </contrib> + </author> </authorgroup> </sect1info> <title><application>sendmail</application> Configuration</title> @@ -393,13 +409,13 @@ FreeBSD.org mail is handled (pri=10) by <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 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><application>sendmail</application> uses the following configuration files:</para> @@ -436,157 +452,161 @@ FreeBSD.org mail is handled (pri=10) by <tbody> <row> <entry> - <filename>/etc/mail/access</filename> - </entry> + <filename>/etc/mail/access</filename></entry> <entry><application>sendmail</application> access database - file</entry> + file</entry> </row> + <row> <entry> - <filename>/etc/mail/aliases</filename> - </entry> + <filename>/etc/mail/aliases</filename></entry> <entry>Mailbox aliases</entry> </row> + <row> <entry> - <filename>/etc/mail/local-host-names</filename> - </entry> + <filename>/etc/mail/local-host-names</filename></entry> <entry>Lists of hosts <application>sendmail</application> - accepts mail for</entry> - </row> + accepts mail for</entry> + </row> + <row> <entry> - <filename>/etc/mail/mailer.conf</filename> - </entry> + <filename>/etc/mail/mailer.conf</filename></entry> <entry>Mailer program configuration</entry> </row> + <row> <entry> - <filename>/etc/mail/mailertable</filename> - </entry> + <filename>/etc/mail/mailertable</filename></entry> <entry>Mailer delivery table</entry> </row> + <row> <entry> - <filename>/etc/mail/sendmail.cf</filename> - </entry> + <filename>/etc/mail/sendmail.cf</filename></entry> <entry><application>sendmail</application> master - configuration file</entry> + configuration file</entry> </row> + <row> <entry> - <filename>/etc/mail/virtusertable</filename> - </entry> + <filename>/etc/mail/virtusertable</filename></entry> <entry>Virtual users and domain tables</entry> </row> </tbody> </tgroup> </informaltable> - <sect2> - <title><filename>/etc/mail/access</filename></title> + <sect2> + <title><filename>/etc/mail/access</filename></title> - <para>The access database defines what 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 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 - 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> + <para>The access database defines what 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 + 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 + 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> <example> <title>Configuring the <application>sendmail</application> - Access Database</title> + Access Database</title> - <programlisting>cyberspammer.com 550 We do not accept mail from spammers + <programlisting>cyberspammer.com 550 We do not accept mail from spammers FREE.STEALTH.MAILER@ 550 We do not accept mail from spammers another.source.of.spam REJECT 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 role="fqdn">okay.cyberspammer.com</hostid>, which is more exact 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> - - <para>When this file is updated, you need to run - <command>make</command> in <filename>/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>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 + role="fqdn">okay.cyberspammer.com</hostid>, which is + more exact 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> + + <para>When this file is updated, you need to run + <command>make</command> in <filename>/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> <example> <title>Mail Aliases</title> - <programlisting>root: localuser + + <programlisting>root: localuser ftp-bugs: joe,eric,paul 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 <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 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; 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> - </sect2> - <sect2> - <title><filename>/etc/mail/local-host-names</filename></title> + 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 + <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 + 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; + 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> + </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> + <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> - <programlisting>example.com + <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> + restarted to read the changes.</para> </sect2> @@ -595,16 +615,18 @@ mail.example.com</programlisting> <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> + 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 - file can be built from &man.m4.1; macros that define the features - and behavior of <application>sendmail</application>. Please see + file can be built from &man.m4.1; macros that define the + features and behavior of <application>sendmail</application>. + Please see <filename>/usr/src/contrib/sendmail/cf/README</filename> for some of the details.</para> @@ -616,52 +638,57 @@ mail.example.com</programlisting> <sect2> <title><filename>/etc/mail/virtusertable</filename></title> - <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 + <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> <example> - <title>Example Virtual Domain Mail Map</title> + <title>Example Virtual Domain Mail Map</title> - <programlisting>root@example.com root + <programlisting>root@example.com root postmaster@example.com postmaster@noc.example.net @example.com joe</programlisting> </example> - <para>In the above example, we have a mapping for a 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 - <email>postmaster@example.com</email> to the mailbox <username>postmaster</username> on the host - <hostid role="fqdn">noc.example.net</hostid>. Finally, if nothing from <hostid role="domainname">example.com</hostid> has - matched so far, it will match the last mapping, which matches - every other mail message addressed to someone at - <hostid role="domainname">example.com</hostid>. - This will be mapped to the local mailbox <username>joe</username>.</para> + <para>In the above example, we have a mapping for a 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 + <email>postmaster@example.com</email> to the mailbox + <username>postmaster</username> on the host + <hostid role="fqdn">noc.example.net</hostid>. Finally, if + nothing from <hostid role="domainname">example.com</hostid> + has matched so far, it will match the last mapping, which + matches every other mail message addressed to someone at + <hostid role="domainname">example.com</hostid>. This will + be mapped to the local mailbox + <username>joe</username>.</para> - </sect2> + </sect2> </sect1> <sect1 id="mail-changingmta"> <sect1info> <authorgroup> - <author> - <firstname>Andrew</firstname> - <surname>Boothman</surname> - <contrib>Written by </contrib> - </author> + <author> + <firstname>Andrew</firstname> + <surname>Boothman</surname> + <contrib>Written by </contrib> + </author> </authorgroup> <authorgroup> - <author> - <firstname>Gregory</firstname> - <surname>Neil Shapiro</surname> - <contrib>Information taken from e-mails written by </contrib> - </author> + <author> + <firstname>Gregory</firstname> + <surname>Neil Shapiro</surname> + <contrib>Information taken from e-mails written + by</contrib> + </author> </authorgroup> </sect1info> <title>Changing Your Mail Transfer Agent</title> + <indexterm> <primary>email</primary> <secondary>change mta</secondary> @@ -694,8 +721,8 @@ postmaster@example.com postmast 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 + 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> @@ -708,32 +735,32 @@ postmaster@example.com postmast <sect2 id="mail-disable-sendmail"> <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> - </warning> + <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> + </warning> - <para>In order to completely disable - <application>sendmail</application>, including the outgoing - mail service, you must use</para> + <para>In order to completely disable + <application>sendmail</application>, including the outgoing + mail service, you must use</para> - <programlisting>sendmail_enable="NO" + <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>in <filename>/etc/rc.conf.</filename></para> <para>If you only want to disable <application>sendmail</application>'s incoming mail service, @@ -741,19 +768,22 @@ sendmail_msp_queue_enable="NO"</programl <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> - </sect2> - - <sect2> - <title>Running Your New MTA on Boot</title> + <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> + </sect2> - <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> + <sect2> + <title>Running Your New MTA on Boot</title> - <screen>&prompt.root; echo '<replaceable>postfix</replaceable>_enable=<quote>YES</quote>' >> /etc/rc.conf</screen> + <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> + + <screen>&prompt.root; echo +'<replaceable>postfix</replaceable>_enable=<quote>YES</quote>' +>> /etc/rc.conf</screen> <para>The MTA will now be automatically started during boot.</para> @@ -761,15 +791,16 @@ sendmail_msp_queue_enable="NO"</programl <sect2> <title>Replacing <application>sendmail</application> as - the System's Default Mailer</title> + 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 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>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 + 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 @@ -779,11 +810,11 @@ sendmail_msp_queue_enable="NO"</programl a system called &man.mailwrapper.8; that does this job for you.</para> *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302121440.r1CEelue065501>