From owner-svn-doc-all@FreeBSD.ORG Fri May 9 18:42:36 2014 Return-Path: Delivered-To: svn-doc-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CBA551C; Fri, 9 May 2014 18:42:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D91B600; Fri, 9 May 2014 18:42:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s49IgauG011347; Fri, 9 May 2014 18:42:36 GMT (envelope-from dru@svn.freebsd.org) Received: (from dru@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s49IgaB7011346; Fri, 9 May 2014 18:42:36 GMT (envelope-from dru@svn.freebsd.org) Message-Id: <201405091842.s49IgaB7011346@svn.freebsd.org> From: Dru Lavigne Date: Fri, 9 May 2014 18:42:36 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r44802 - 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-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2014 18:42:36 -0000 Author: dru Date: Fri May 9 18:42:36 2014 New Revision: 44802 URL: http://svnweb.freebsd.org/changeset/doc/44802 Log: Start to modernize the Sendmail configuration file section. More commits to come Sponsored by: iXsystems 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 Fri May 9 18:27:07 2014 (r44801) +++ head/en_US.ISO8859-1/books/handbook/mail/chapter.xml Fri May 9 18:42:36 2014 (r44802) @@ -282,7 +282,8 @@ FreeBSD.org mail is handled by 10 mx1.Fr - <application>Sendmail</application> Configuration + <application>Sendmail</application> Configuration + Files ChristopherShumwayContributed @@ -294,17 +295,18 @@ FreeBSD.org mail is handled by 10 mx1.Fr Sendmail - &man.sendmail.8; is the default MTA - which is installed with &os;. - Sendmail accepts mail from + Sendmail is the default + MTA installed with &os;. + It accepts mail from MUAs and delivers it to the appropriate - mailer as defined by its configuration file. + mail host, as defined by its configuration. Sendmail can also accept network connections and deliver mail to local mailboxes or to another program. - Sendmail uses the following - configuration files. This section describes these files in more + The configuration files for + Sendmail are located in + /etc/mail. This section describes these files in more detail. @@ -328,117 +330,69 @@ FreeBSD.org mail is handled by 10 mx1.Fr /etc/mail/virtusertable - - - - - Filename - Function - - - - - - /etc/mail/access - Sendmail access database - file. - - - - - /etc/mail/aliases - Mailbox aliases - - - - - /etc/mail/local-host-names - Lists of hosts Sendmail - accepts mail for. - - - - - /etc/mail/mailer.conf - Mailer program configuration. - - - - - /etc/mail/mailertable - Mailer delivery table. - - - - - /etc/mail/sendmail.cf - Sendmail master - configuration file. - - - - - /etc/mail/virtusertable - Virtual users and domain tables. - - - - - - <filename>/etc/mail/access</filename> - - This database defines which host(s) or IP addresses + + + /etc/mail/access + + This access database file defines which hosts or IP addresses have access to the local mail server and what kind of access - they have. Hosts can be listed as , - , or , or can be - passed to Sendmail's error - handling routine with a given mailer error. Hosts that - are listed as , 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 + they have. Hosts listed as , 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 listed as are rejected for all mail - connections. Hosts that are listed as - are allowed to send mail for any - destination using this mail server. - - - Configuring the <application>Sendmail</application> - Access Database - - 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 - - - This example shows five entries. Mail senders that match + connections. Hosts listed as are + allowed to send mail for any destination using this mail + server. Hosts listed as will have their mail returned with + the specified mail error. If a host is listed + as , Sendmail + will abort the current search for this entry without accepting + or rejecting the mail. Hosts listed + as will have their messages held and will receive the + specified text as the reason for the hold. + + Examples of using these options for both + IPv4 and IPv6 + addresses can be found in the &os; sample configuration, + /etc/mail/access.sample: + + # $FreeBSD$ +# +# Mail relay access control list. Default is to reject mail unless the +# destination is local, or listed in /etc/mail/local-host-names +# +## Examples (commented out for safety) +#From:cyberspammer.com ERROR:"550 We don't accept mail from spammers" +#From:okay.cyberspammer.com OK +#Connect:sendmail.org RELAY +#To:sendmail.org RELAY +#Connect:128.32 RELAY +#Connect:128.32.2 SKIP +#Connect:IPv6:1:2:3:4:5:6:7 RELAY +#Connect:suspicious.example.com QUARANTINE:Mail from suspicious host +#Connect:[127.0.0.3] OK +#Connect:[IPv6:1:2:3:4:5:6:7:8] OK + + To configure the access database, use the format shown in + the sample to make entries in + /etc/mail/access, but do not put a + comment symbol (#) in front of the entries. Create + an entry for each host or network whose access should be + configured. 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 Sendmail'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, - another.source.of.spam. The fourth - entry accepts mail connections from okay.cyberspammer.com, - which is more specific than the cyberspammer.com line - above. More specific matches override less exact matches. - The last entry allows relaying of email from hosts with an IP - address that begins with 128.32. - These hosts can send mail through this mail server that is - destined for other mail servers. + right side of the table. - Whenever this file is updated, run make - in /etc/mail/ to update the - database. + Whenever this file is updated, update its database and + restart Sendmail: - - - <filename>/etc/mail/aliases</filename> + &prompt.root; makemap hash /etc/mail/access < /etc/mail/access +&prompt.root; service sendmail restart + + + + /etc/mail/aliases + 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 @@ -477,11 +431,13 @@ procmail: "|/usr/local/bin/procmail"Whenever this file is updated, 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 + + /etc/mail/local-host-names + + This is a list of hostnames Sendmail will accept as the local host name. Place any domains or hosts that Sendmail will receive mail for. For example, to configure a mail server to accept mail for the @@ -497,11 +453,12 @@ mail.example.com Whenever this file is updated, &man.sendmail.8; needs to be restarted so that it will read the changes. - - - - <filename>/etc/mail/sendmail.cf</filename> + + + + /etc/mail/sendmail.cf + This is the master configuration file for Sendmail. It controls the overall behavior of Sendmail, including @@ -520,13 +477,14 @@ mail.example.com Whenever changes to this file are made, Sendmail needs to be restarted for the changes to take effect. + + - - - <filename>/etc/mail/virtusertable</filename> - + + /etc/mail/virtusertable + The virtusertable maps mail addresses - for virtual domains and mailboxes to real mailboxes. These + for virtual domains and users to real mailboxes. These mailboxes can be local, remote, aliases defined in /etc/mail/aliases, or files. @@ -553,8 +511,9 @@ postmaster@example.com postmast mail message addressed to someone at example.com to the local mailbox joe. - - + + +