From owner-svn-doc-head@FreeBSD.ORG Tue Feb 12 14:40:47 2013 Return-Path: Delivered-To: svn-doc-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DF946741; Tue, 12 Feb 2013 14:40:47 +0000 (UTC) (envelope-from dru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D180187E; Tue, 12 Feb 2013 14:40:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1CEel7Q065502; Tue, 12 Feb 2013 14:40:47 GMT (envelope-from dru@svn.freebsd.org) Received: (from dru@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1CEelue065501; Tue, 12 Feb 2013 14:40:47 GMT (envelope-from dru@svn.freebsd.org) Message-Id: <201302121440.r1CEelue065501@svn.freebsd.org> From: Dru Lavigne Date: Tue, 12 Feb 2013 14:40:47 +0000 (UTC) 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 X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Feb 2013 14:40:47 -0000 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 @@ Synopsis + email - Electronic Mail, 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 . + Electronic Mail, 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 + . After reading this chapter, you will know: - What software components are involved in sending and receiving - electronic mail. + What software components are involved in sending and + receiving electronic mail. - Where basic sendmail configuration - files are located in FreeBSD. + Where basic sendmail + configuration files are located in FreeBSD. - The difference between remote and + The difference between remote and local mailboxes. - How to block spammers from illegally using your mail server as a - relay. + How to block spammers from illegally using your mail + server as a relay. - How to install and configure an alternate Mail Transfer Agent on - your system, replacing sendmail. + How to install and configure an alternate Mail Transfer + Agent on your system, replacing + sendmail. @@ -84,22 +87,24 @@ - How to configure SMTP Authentication for added security. + How to configure SMTP Authentication for added + security. - How to install and use a Mail User Agent, such as - mutt to send and receive email. + How to install and use a Mail User Agent, such as + mutt to send and receive + email. - - How to download your mail from a remote POP - or IMAP server. + How to download your mail from a remote + POP or IMAP + server. - How to automatically apply filters and rules to incoming + How to automatically apply filters and rules to incoming email. @@ -119,56 +124,61 @@ Know how to install additional third-party software - (). + (). + Using Electronic Mail + POP IMAP DNS - There are five major parts involved in an email exchange. They - are: the user program, the server daemon, DNS, a - remote or local mailbox, and of course, the - mailhost itself. + There are five major parts involved in an email exchange. + They are: the user program, + the server daemon, DNS, a + remote or local mailbox, and of course, the mailhost itself. The User Program This includes command line programs such as mutt, - alpine, elm, - and mail, and GUI programs such as - balsa, + alpine, + elm, and + mail, and GUI + programs such as balsa, xfmail to name a few, and something more sophisticated like a WWW browser. These programs simply pass off the email transactions to the local - mailhost, either - by calling one of the server - daemons available, or delivering it over TCP. - + mailhost, + either by calling one of the server + daemons available, or delivering it over + TCP. + Mailhost Server Daemon + - mail server daemons - sendmail + mail server daemons + sendmail - mail server daemons - postfix + mail server daemons + postfix - mail server daemons - qmail + mail server daemons + qmail - mail server daemons - exim + mail server daemons + exim &os; ships with sendmail by @@ -189,14 +199,15 @@ - The server daemon usually has two functions—it is responsible - for receiving incoming mail as well as delivering outgoing mail. It is - not responsible for the collection of mail using protocols - such as POP or IMAP to - read your email, nor does it allow connecting to local - mbox or Maildir mailboxes. You may require - an additional daemon for - that. + The server daemon usually has two functions—it is + responsible for receiving incoming mail as well as delivering + outgoing mail. It is not responsible + for the collection of mail using protocols such as + POP or IMAP to read + your email, nor does it allow connecting to local + mbox or Maildir mailboxes. You may + require an additional daemon for that. Older versions of sendmail @@ -205,7 +216,7 @@ Make sure that you are running a current version to avoid these problems. Optionally, install an alternative MTA from the &os; - Ports Collection. + Ports Collection. @@ -213,12 +224,12 @@ Email and DNS The Domain Name System (DNS) and its daemon - named 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. + named 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. MX record @@ -242,149 +253,154 @@ FreeBSD.org mail is handled (pri=10) by Receiving Mail + - email - receiving + email + receiving - 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 mbox (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 + 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 mbox (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 mutt, or remotely accessed and - collected using protocols such as - POP or IMAP. - This means that should you only - wish to read mail locally, you are not required to install a - POP or IMAP server. + collected using protocols such as POP or + IMAP. This means that should you only + wish to read mail locally, you are not required to install + a POP or IMAP + server. - Accessing remote mailboxes using <acronym>POP</acronym> and <acronym>IMAP</acronym> + Accessing remote mailboxes using <acronym>POP</acronym> + and <acronym>IMAP</acronym> - POP - IMAP - In order to access mailboxes remotely, you are required to - have access to a POP or IMAP - server. These protocols allow users to connect to their mailboxes from - remote locations with ease. Though both - POP and IMAP allow users - to remotely access mailboxes, IMAP offers - many advantages, some of which are: - - - - IMAP can store messages on a remote - server as well as fetch them. - - - - IMAP supports concurrent updates. - + POP + IMAP + In order to access mailboxes remotely, you are required + to have access to a POP or + IMAP server. These protocols allow users + to connect to their mailboxes from remote locations with + ease. Though both POP and + IMAP allow users to remotely access + mailboxes, IMAP offers many advantages, + some of which are: + + + + IMAP can store messages on a + remote server as well as fetch them. + + + + IMAP supports concurrent + updates. + - + IMAP 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. - + - + - In order to install a POP or - IMAP server, the following steps should be - performed: + In order to install a POP or + IMAP server, the following steps should + be performed: - + Choose an IMAP or - POP server that best suits your needs. - The following POP and + POP server that best suits your + needs. The following POP and IMAP servers are well known and serve as some good examples: - - - qpopper; - - - - teapop; - - - - imap-uw; - - - - courier-imap; - - - - dovecot; - - + + + qpopper; + + + + teapop; + + + + imap-uw; + + + + courier-imap; + + + + dovecot; + + - + Install the POP or - IMAP daemon of your choosing from the - ports - collection. + IMAP daemon of your choosing from + the ports collection. - Where required, modify /etc/inetd.conf - to load the POP or - IMAP server. + Where required, modify + /etc/inetd.conf to load the + POP or IMAP + server. - + - It should be noted that both POP and - IMAP 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 and SSL is + It should be noted that both POP + and IMAP 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 + and SSL is described in . - + - Accessing Local Mailboxes + Accessing Local Mailboxes Mailboxes may be accessed locally by directly utilizing MUAs on the server on which the mailbox resides. This can be done using applications such as - mutt or &man.mail.1;. - + mutt or &man.mail.1;. The Mail Host + mail host 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. + responsible for delivering and receiving mail for your host, + and possibly your network. - - Christopher - Shumway - Contributed by - + + Christopher + Shumway + Contributed by + <application>sendmail</application> Configuration @@ -393,13 +409,13 @@ FreeBSD.org mail is handled (pri=10) by sendmail - &man.sendmail.8; is the default Mail Transfer Agent (MTA) in - FreeBSD. sendmail's job is to accept - mail from Mail User Agents (MUA) and deliver it - to the appropriate mailer as defined by its configuration file. - sendmail can also accept network - connections and deliver mail to local mailboxes or deliver it to - another program. + &man.sendmail.8; is the default Mail Transfer Agent (MTA) + in FreeBSD. sendmail's job is to + accept mail from Mail User Agents (MUA) and + deliver it to the appropriate mailer as defined by its + configuration file. sendmail can + also accept network connections and deliver mail to local + mailboxes or deliver it to another program. sendmail uses the following configuration files: @@ -436,157 +452,161 @@ FreeBSD.org mail is handled (pri=10) by - /etc/mail/access - + /etc/mail/access sendmail access database - file + file + - /etc/mail/aliases - + /etc/mail/aliases Mailbox aliases + - /etc/mail/local-host-names - + /etc/mail/local-host-names Lists of hosts sendmail - accepts mail for - + accepts mail for + + - /etc/mail/mailer.conf - + /etc/mail/mailer.conf Mailer program configuration + - /etc/mail/mailertable - + /etc/mail/mailertable Mailer delivery table + - /etc/mail/sendmail.cf - + /etc/mail/sendmail.cf sendmail master - configuration file + configuration file + - /etc/mail/virtusertable - + /etc/mail/virtusertable Virtual users and domain tables - - <filename>/etc/mail/access</filename> + + <filename>/etc/mail/access</filename> - 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 , - , or simply passed - to sendmail's error handling routine with a given mailer error. - Hosts that are listed as , 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 are rejected for all mail - connections. Hosts that have the option - for their hostname are allowed to send mail for any destination - through this mail server. + 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 , + , or simply + passed to sendmail's error + handling routine with a given mailer error. Hosts that + are listed as , 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 are rejected for all mail + connections. Hosts that have the + option for their hostname are allowed to send mail for any + destination through this mail server. Configuring the <application>sendmail</application> - Access Database + Access Database - cyberspammer.com 550 We do not accept mail from spammers + 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 - 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 sendmail'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, - another.source.of.spam. The next entry accepts - mail connections from a host - okay.cyberspammer.com, which is more exact than - the cyberspammer.com 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 128.32. These hosts would be able - to send mail through this mail server that are destined for other - mail servers. - - When this file is updated, you need to run - make in /etc/mail/ to - update the database. - - - - <filename>/etc/mail/aliases</filename> - - 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 - /etc/mail/aliases: + 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 sendmail'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, another.source.of.spam. The next + entry accepts mail connections from a host okay.cyberspammer.com, which is + more exact than the cyberspammer.com 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 128.32. These + hosts would be able to send mail through this mail server + that are destined for other mail servers. + + When this file is updated, you need to run + make in /etc/mail/ + to update the database. + + + + <filename>/etc/mail/aliases</filename> + + 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 + /etc/mail/aliases: Mail Aliases - root: localuser + + root: localuser ftp-bugs: joe,eric,paul bit.bucket: /dev/null procmail: "|/usr/local/bin/procmail" 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 root - to the mailbox localuser, which is then - looked up again in the aliases database. If no match is found, - then the message is delivered to the local user - localuser. The next example shows a mail - list. Mail to the mailbox ftp-bugs is - expanded to the three local mailboxes joe, - eric, and paul. Note - that a remote mailbox could be specified as user@example.com. The - next example shows writing mail to a file, in this case - /dev/null. The last example shows sending - mail to a program, in this case the mail message is written to the - standard input of /usr/local/bin/procmail - through a &unix; pipe. - - When this file is updated, you need to run - make in /etc/mail/ to - update the database. - - - <filename>/etc/mail/local-host-names</filename> + side of the colon is expanded to the target(s) on the right. + The first example expands the mailbox + root to the mailbox + localuser, which is then looked up again + in the aliases database. If no match is found, then the + message is delivered to the local user + localuser. The next example shows a + mail list. Mail to the mailbox ftp-bugs + is expanded to the three local mailboxes + joe, eric, and + paul. Note that a remote mailbox could + be specified as user@example.com. The next + example shows writing mail to a file, in this case + /dev/null. The last example shows + sending mail to a program, in this case the mail message is + written to the standard input of + /usr/local/bin/procmail through a &unix; + pipe. + + When this file is updated, you need to run + make in /etc/mail/ + to update the database. + + + <filename>/etc/mail/local-host-names</filename> - This is a list of hostnames &man.sendmail.8; is to accept as - the local host name. Place any domains or hosts that - sendmail is to be receiving mail for. - For example, if this mail server was to accept mail for the - domain example.com and the host - mail.example.com, its - local-host-names might look something like - this: + This is a list of hostnames &man.sendmail.8; is to accept + as the local host name. Place any domains or hosts that + sendmail is to be receiving mail + for. For example, if this mail server was to accept mail for + the domain example.com and + the host mail.example.com, its + local-host-names might look something + like this: - example.com + example.com mail.example.com When this file is updated, &man.sendmail.8; needs to be - restarted to read the changes. + restarted to read the changes. @@ -595,16 +615,18 @@ mail.example.com sendmail's master configuration file, sendmail.cf controls the overall - behavior of sendmail, 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. + behavior of sendmail, 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. The master sendmail configuration - file can be built from &man.m4.1; macros that define the features - and behavior of sendmail. Please see + file can be built from &man.m4.1; macros that define the + features and behavior of sendmail. + Please see /usr/src/contrib/sendmail/cf/README for some of the details. @@ -616,52 +638,57 @@ mail.example.com <filename>/etc/mail/virtusertable</filename> - The virtusertable maps mail addresses for - virtual domains and - mailboxes to real mailboxes. These mailboxes can be local, - remote, aliases defined in + The virtusertable maps mail addresses + for virtual domains and mailboxes to real mailboxes. These + mailboxes can be local, remote, aliases defined in /etc/mail/aliases or files. - Example Virtual Domain Mail Map + Example Virtual Domain Mail Map - root@example.com root + root@example.com root postmaster@example.com postmaster@noc.example.net @example.com joe - In the above example, we have a mapping for a domain - example.com. This file is processed in a - first match order down the file. The first item maps - root@example.com to the local mailbox root. The next entry maps - postmaster@example.com to the mailbox postmaster on the host - noc.example.net. Finally, if nothing from example.com has - matched so far, it will match the last mapping, which matches - every other mail message addressed to someone at - example.com. - This will be mapped to the local mailbox joe. + In the above example, we have a mapping for a domain + example.com. This file + is processed in a first match order down the file. The first + item maps root@example.com to the local mailbox + root. The next entry maps + postmaster@example.com to the mailbox + postmaster on the host + noc.example.net. Finally, if + nothing from example.com + has matched so far, it will match the last mapping, which + matches every other mail message addressed to someone at + example.com. This will + be mapped to the local mailbox + joe. - + - - Andrew - Boothman - Written by - + + Andrew + Boothman + Written by + - - Gregory - Neil Shapiro - Information taken from e-mails written by - + + Gregory + Neil Shapiro + Information taken from e-mails written + by + Changing Your Mail Transfer Agent + email change mta @@ -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 sendmail. 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 /usr/bin/sendmail. Otherwise, your new mail software has essentially been put into service before you have configured it. @@ -708,32 +735,32 @@ postmaster@example.com postmast Disable <application>sendmail</application> - - If you disable sendmail'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 - sendmail-compatible system. If - applications continue to use - sendmail's binaries to try to send - e-mail after you have disabled them, mail could go into an - inactive sendmail queue, and - never be delivered. - + + If you disable sendmail'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 + sendmail-compatible system. If + applications continue to use + sendmail's binaries to try to + send e-mail after you have disabled them, mail could go + into an inactive sendmail queue, + and never be delivered. + - In order to completely disable - sendmail, including the outgoing - mail service, you must use + In order to completely disable + sendmail, including the outgoing + mail service, you must use - sendmail_enable="NO" + sendmail_enable="NO" sendmail_submit_enable="NO" sendmail_outbound_enable="NO" sendmail_msp_queue_enable="NO" - in /etc/rc.conf. + in /etc/rc.conf. If you only want to disable sendmail's incoming mail service, @@ -741,19 +768,22 @@ sendmail_msp_queue_enable="NO"sendmail_enable="NO" - in /etc/rc.conf. More information on - sendmail's startup options is - available from the &man.rc.sendmail.8; manual page. - - - - Running Your New MTA on Boot + in /etc/rc.conf. More information + on sendmail's startup options + is available from the &man.rc.sendmail.8; manual + page. + - The new MTA can be started during boot by adding a - configuration line to /etc/rc.conf - like the following example for postfix: + + Running Your New MTA on Boot - &prompt.root; echo 'postfix_enable=YES' >> /etc/rc.conf + The new MTA can be started during boot by adding a + configuration line to /etc/rc.conf + like the following example for postfix: + + &prompt.root; echo +'postfix_enable=YES' +>> /etc/rc.conf The MTA will now be automatically started during boot. @@ -761,15 +791,16 @@ sendmail_msp_queue_enable="NO" Replacing <application>sendmail</application> as - the System's Default Mailer + the System's Default Mailer - The program sendmail 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 sendmail - command-line interface; this facilitates using them as - drop-in replacements for sendmail. + The program sendmail 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 + sendmail command-line interface; + this facilitates using them as drop-in + replacements for sendmail. 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" *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***