[deployment-guide/comm-rel: 444/727] fixed screen-command in Email chapter

Jaromir Hradilek jhradile at fedoraproject.org
Tue Oct 19 13:02:10 UTC 2010


commit ed8cdb0197c9057a119654305a4efe2f5d9a079e
Author: Martin Prpic <mprpic at redhat.com>
Date:   Fri Aug 20 14:59:59 2010 +0200

    fixed screen-command in Email chapter

 en-US/Email.xml |  103 ++++++++++++++++++++++++++++--------------------------
 1 files changed, 53 insertions(+), 50 deletions(-)
---
diff --git a/en-US/Email.xml b/en-US/Email.xml
index efd684d..bf90b94 100644
--- a/en-US/Email.xml
+++ b/en-US/Email.xml
@@ -130,13 +130,13 @@
           </listitem>
           <listitem>
             <para>Make that change operational for the current session by running the following command:</para>
-            <screen>/sbin/service dovecot restart
-</screen>
+            <screen>~]#&#160;<command>service dovecot restart</command>
+            </screen>
           </listitem>
           <listitem>
             <para>Make that change operational after the next reboot by running the command:</para>
-            <screen>chkconfig dovecot on
-</screen>
+            <screen>~]#&#160;<command>chkconfig dovecot on</command>
+            </screen>
           <note>
             <title>Note</title>
               <para>
@@ -146,7 +146,7 @@
           </listitem>
         </orderedlist>
         <para>Unlike <systemitem class="protocol">SMTP</systemitem>, both <systemitem class="protocol">IMAP</systemitem> and <systemitem class="protocol">POP3</systemitem> require connecting clients to authenticate using a username and password. By default, passwords for both protocols are passed over the network unencrypted.</para>
-        <para>To configure <systemitem class="protocol">SSL</systemitem> on <command>dovecot</command>:
+        <para>To configure <systemitem class="protocol">SSL</systemitem> on <command>dovecot</command>:</para>
 					<itemizedlist>
 						<listitem>
 							<para>Edit the <filename>/etc/pki/dovecot/dovecot-openssl.conf</filename> configuration file as you prefer. However, in a typical installation, this file does not require modification.</para>
@@ -155,9 +155,12 @@
               <para>Rename, move or delete the files <filename>/etc/pki/dovecot/certs/dovecot.pem</filename> and <filename>/etc/pki/dovecot/private/dovecot.pem</filename>.</para>
             </listitem>
             <listitem>
-              <para>Execute the <filename>/usr/libexec/dovecot/mkcert.sh</filename> script which creates the <command>dovecot</command> self signed certificates. These certificates are copied in the <filename>/etc/pki/dovecot/certs</filename> and <filename>/etc/pki/dovecot/private</filename> directories. To implement the changes, restart <command>dovecot</command> (<command>/sbin/service dovecot restart</command>).</para>
+              <para>Execute the <filename>/usr/libexec/dovecot/mkcert.sh</filename> script which creates the <command>dovecot</command> self signed certificates. These certificates are copied in the <filename>/etc/pki/dovecot/certs</filename> and <filename>/etc/pki/dovecot/private</filename> directories. To implement the changes, restart <command>dovecot</command>:</para>
+              <screen>~]#&#160;<command>service dovecot restart</command>
+              </screen>
             </listitem>
           </itemizedlist>
+          <para>
 					 More details on <command>dovecot</command> can be found online at <ulink
             url="http://www.dovecot.org">http://www.dovecot.org</ulink>.</para>
       </section>
@@ -179,7 +182,7 @@
         significance="normal">
         <primary>email</primary>
         <secondary>types</secondary>
-        <tertiary>Mail Tranport Agent</tertiary>
+        <tertiary>Mail Transport Agent</tertiary>
       </indexterm>
       <indexterm
         significance="normal">
@@ -246,8 +249,15 @@
   <section
     id="s1-email-mta">
     <title>Mail Transport Agents</title>
-    <para>&MAJOROS; offers two primary MTAs: Postfix and Sendmail. Postfix is configured as the default MTA, although it is easy to switch the default MTA to Sendmail. To switch the default MTA to Sendmail, you can either uninstall Postfix or use the <command>alternatives --config mta</command> command to switch to Sendmail. You can also use the <command>chkconfig <replaceable>&lt;service&gt;</replaceable> <replaceable>&lt;on/off&gt;</replaceable> </command> command to enable/disable the desired service.
+    <para>&MAJOROS; offers two primary MTAs: Postfix and Sendmail. Postfix is configured as the default MTA, although it is easy to switch the default MTA to Sendmail. To switch the default MTA to Sendmail, you can either uninstall Postfix or use the following command to switch to Sendmail:</para>
+    <screen>
+<command>~]#&#160;alternatives --config mta</command>
+    </screen>
+    <para>
+     You can also use the following command to to enable/disable the desired service:
     </para>
+    <screen>~]#&#160;<command>chkconfig <replaceable>&lt;service&gt;</replaceable> <replaceable>&lt;on/off&gt;</replaceable></command>
+    </screen> 
     <section
       id="s2-email-mta-postfix">
       <title>Postfix</title>
@@ -306,7 +316,9 @@
               linkend="s3-email-mta-postfix-conf"/>.</para>
         </important>
         <para>
-        Restart the <systemitem class="service">postfix</systemitem> service after changing any options in the configuration files under the <filename>/etc/postfix</filename> directory in order for those changes to take effect (<command>/sbin/service postfix restart</command>).
+        Restart the <systemitem class="service">postfix</systemitem> service after changing any options in the configuration files under the <filename>/etc/postfix</filename> directory in order for those changes to take effect:
+        <screen>~]#&#160;<command>service postfix restart</command>
+        </screen> 
         </para>
       </section>
       <section
@@ -401,11 +413,12 @@
         <para>Sendmail's lengthy and detailed configuration file is <filename>/etc/mail/sendmail.cf</filename>. Avoid editing the <filename>sendmail.cf</filename> file directly. To make configuration changes to Sendmail, edit the <filename>/etc/mail/sendmail.mc</filename> file, back up the original <filename>/etc/mail/sendmail.cf</filename>, and use the following alternatives to generate a new configuration file:</para>
         <itemizedlist>
           <listitem>
-            <para>Use the included makefile in <filename>/etc/mail</filename> (<command>make all -C /etc/mail</command>) to create a new <filename>/etc/mail/sendmail.cf</filename> configuration file. All other generated files in <filename>/etc/mail</filename> (db files) will be regenerated if needed. The old makemap commands are still usable. The make command will automatically be used by <command>/sbin/service sendmail start | restart | reload</command>.</para>
+            <para>Use the included makefile in <filename>/etc/mail</filename> (<command>~]#&#160;make all -C /etc/mail</command>) to create a new <filename>/etc/mail/sendmail.cf</filename> configuration file. All other generated files in <filename>/etc/mail</filename> (db files) will be regenerated if needed. The old makemap commands are still usable. The make command will automatically be used by <command>service sendmail start | restart | reload</command>.</para>
           </listitem>
           <listitem>
             <para>Alternatively you may use the <command>m4</command> macro processor to create a new <filename>/etc/mail/sendmail.cf</filename>. The <command>m4</command> macro processor is not installed by default. Before using it to create <filename>/etc/mail/sendmail.cf</filename>, install the <package>m4</package> package as root:</para>
-            <screen>yum install m4</screen>
+            <screen>~]#&#160;<command>yum install m4</command>
+            </screen>
           </listitem>
         </itemizedlist>
         <para>More information on configuring Sendmail can be found in <xref
@@ -434,22 +447,19 @@
           </listitem>
         </itemizedlist>
         <para>Several of the configuration files in <filename>/etc/mail/</filename>, such as <filename>access</filename>, <filename>domaintable</filename>, <filename>mailertable</filename> and <filename>virtusertable</filename>, must actually store their information in database files before Sendmail can use any configuration changes. To include any changes made to these configurations in their database files, run the following command as root:</para>
-        <screen>
-<command>makemap hash /etc/mail/<replaceable>&lt;name&gt;</replaceable> &lt; /etc/mail/<replaceable>&lt;name&gt;</replaceable></command>
-        </screen>
+        <screen>~]#&#160;<command>makemap hash /etc/mail/<replaceable>&lt;name&gt;</replaceable> &lt; /etc/mail/<replaceable>&lt;name&gt;</replaceable></command>
+        </screen> 
         <para>where <replaceable>&lt;name&gt;</replaceable> represents the name of the configuration file to be updated.
         You may also restart the <systemitem class="service">sendmail</systemitem> service for the changes to take effect by running:</para>
-        <screen>
-<command>/sbin/service sendmail restart</command>
-        </screen>
+        <screen>~]#&#160;<command>service sendmail restart</command>
+        </screen> 
         <para>For example, to have all emails addressed to the <filename>example.com</filename> domain delivered to <email>bob at other-example.com</email>, add the following line to the <filename>virtusertable</filename> file:</para>
         <screen>
 <command>@example.com bob at other-example.com</command>
         </screen>
         <para>To finalize the change, the <filename>virtusertable.db</filename> file must be updated:</para>
-        <screen>
-<command>makemap hash /etc/mail/virtusertable &lt; /etc/mail/virtusertable</command>
-        </screen>
+        <screen>~]#&#160;<command>makemap hash /etc/mail/virtusertable &lt; /etc/mail/virtusertable</command>
+        </screen> 
         <para>Sendmail will create an updated <filename>virtusertable.db</filename> file containing the new configuration.</para>
       </section>
       <section
@@ -471,9 +481,8 @@
           <para>Before changing the <filename>sendmail.cf</filename> file, it is a good idea to create a backup copy.</para>
         </warning>
         <para>To add the desired functionality to Sendmail, edit the <filename>/etc/mail/sendmail.mc</filename> file as root. Once you are finished, restart the <systemitem class="service">sendmail</systemitem> service and, if the <package>m4</package> package is installed, the <command>m4</command> macro processor will automatically generate a new <filename>sendmail.cf</filename> configuration file:</para>
-        <screen>
-          <command>/sbin/service sendmail restart</command>
-        </screen>
+        <screen>~]#&#160;<command>service sendmail restart</command>
+        </screen> 
         <!--mlichvar: also happens automatically
         When finished, use the <command>m4</command> macro processor to generate a new <filename>sendmail.cf</filename> by executing the following command:</para>
         <screen>
@@ -487,9 +496,8 @@
         <important>
           <title>Important</title>
           <para>The default <filename>sendmail.cf</filename> file does not allow Sendmail to accept network connections from any host other than the local computer. To configure Sendmail as a server for other clients, edit the <filename>/etc/mail/sendmail.mc</filename> file, and either change the address specified in the <command>Addr=</command> option of the <command>DAEMON_OPTIONS</command> directive from <command>127.0.0.1</command> to the IP address of an active network device or comment out the <command>DAEMON_OPTIONS</command> directive all together by placing <command>dnl</command> at the beginning of the line. When finished, regenerate <filename>/etc/mail/sendmail.cf</filename> by restarting the service</para>
-          <screen>
-<command>/sbin/service sendmail restart</command>
-          </screen>
+          <screen>~]#&#160;<command>service sendmail restart</command>
+          </screen> 
         </important>
         <para>The default configuration which ships with &MAJOROS; works for most <systemitem class="protocol">SMTP</systemitem>-only sites. However, it does not work for <firstterm>UUCP</firstterm> (<firstterm>UNIX to UNIX Copy</firstterm>) sites. If using UUCP mail transfers, the <filename>/etc/mail/sendmail.mc</filename> file must be reconfigured and a new <filename>/etc/mail/sendmail.cf</filename> file must be generated.</para>
         <para>Consult the <filename>/usr/share/sendmail-cf/README</filename> file before editing any files in the directories under the <filename>/usr/share/sendmail-cf</filename> directory, as they can affect the future configuration of the <filename>/etc/mail/sendmail.cf</filename> file.</para>
@@ -532,16 +540,17 @@ MASQUERADE_AS(bigcorp.com)dnl
         <para>Email spam can be defined as unnecessary and unwanted email received by a user who never requested the communication. It is a disruptive, costly, and widespread abuse of Internet communication standards.</para>
         <para>Sendmail makes it relatively easy to block new spamming techniques being employed to send junk email. It even blocks many of the more usual spamming methods by default. Main anti-spam features available in sendmail are <firstterm>header checks</firstterm>, <firstterm>relaying denial</firstterm> (default from version 8.9), <firstterm>access database and sender information checks</firstterm>.
         </para>
-        <para>For example, forwarding of <systemitem class="protocol">SMTP</systemitem> messages, also called relaying, has been disabled by default since Sendmail version 8.9. Before this change occurred, Sendmail directed the mail host (<filename>x.edu</filename>) to accept messages from one party (<filename>y.com</filename>) and sent them to a different party (<filename>z.net</filename>). Now, however, Sendmail must be configured to permit any domain to relay mail through the server. To configure relay domains, edit the <filename>/etc/mail/relay-domains</filename> file and restart Sendmail (<command>/sbin/service sendmail restart</command>).</para>
+        <para>For example, forwarding of <systemitem class="protocol">SMTP</systemitem> messages, also called relaying, has been disabled by default since Sendmail version 8.9. Before this change occurred, Sendmail directed the mail host (<filename>x.edu</filename>) to accept messages from one party (<filename>y.com</filename>) and sent them to a different party (<filename>z.net</filename>). Now, however, Sendmail must be configured to permit any domain to relay mail through the server. To configure relay domains, edit the <filename>/etc/mail/relay-domains</filename> file and restart Sendmail</para>
+        <screen>~]#&#160;<command>service sendmail restart</command>
+        </screen> 
         <para>However, many times users are bombarded with spam from other servers throughout the Internet. In these instances, Sendmail's access control features available through the <filename>/etc/mail/access</filename> file can be used to prevent connections from unwanted hosts. The following example illustrates how this file can be used to both block and specifically allow access to the Sendmail server:</para>
         <screen>
 <command>badspammer.com ERROR:550 "Go away and do not spam us anymore" tux.badspammer.com OK 10.0 RELAY</command>
         </screen>
         <para>This example shows that any email sent from <filename>badspammer.com</filename> is blocked with a 550 RFC-821 compliant error code, with a message sent back to the spammer. Email sent from the <filename>tux.badspammer.com</filename> sub-domain, is accepted. The last line shows that any email sent from the 10.0.*.* network can be relayed through the mail server.</para>
         <para>Because the <filename>/etc/mail/access.db</filename> file is a database, use the <command>makemap</command> command to update any changes. Do this using the following command as root:</para>
-        <screen>
-<command>makemap hash /etc/mail/access &lt; /etc/mail/access</command>
-        </screen>
+        <screen>~]#&#160;<command>makemap hash /etc/mail/access &lt; /etc/mail/access</command>
+        </screen> 
         <para>Message header analysis allows you to reject mail based on header contents. <systemitem class="protocol">SMTP</systemitem> servers store information about an email's journey in the message header. As the message travels from one MTA to another, each puts in a <literal>Received</literal> header above all the other <literal>Received</literal> headers. It is important to note that this information may be altered by spammers.</para>
         <para>The above examples only represent a small part of what Sendmail can do in terms of allowing or blocking access. Refer to the <filename>/usr/share/sendmail-cf/README</filename> for more information and examples.</para>
         <para>Since Sendmail calls the Procmail MDA when delivering mail, it is also possible to use a spam filtering program, such as SpamAssassin, to identify and file spam for users. Refer to <xref
@@ -1288,10 +1297,9 @@ poll mail.domain2.com
         </screen>
         <para>This rule files all email tagged in the header as spam into a mailbox called <filename>spam</filename>.</para>
         <para>Since SpamAssassin is a Perl script, it may be necessary on busy servers to use the binary SpamAssassin daemon (<systemitem class="daemon">spamd</systemitem>) and the client application (<application>spamc</application>). Configuring SpamAssassin this way, however, requires root access to the host.</para>
-        <para>To start the <systemitem class="daemon">spamd</systemitem> daemon, type the following command as root:</para>
-        <screen>
-<command>/sbin/service spamassassin start</command>
-        </screen>
+        <para>To start the <systemitem class="daemon">spamd</systemitem> daemon, type the following command:</para>
+        <screen>~]#&#160;<command>service spamassassin start</command>
+        </screen> 
         <para>To start the SpamAssassin daemon when the system is booted, use an initscript utility, such as the <application>Services Configuration Tool</application> (<command>system-config-services</command>), to turn on the <computeroutput>spamassassin</computeroutput> service. Refer to <xref linkend="ch-Controlling_Access_to_Services"/> for more information about starting and stopping services.</para>
         <para>To configure Procmail to use the SpamAssassin client application instead of the Perl script, place the following line near the top of the <filename>~/.procmailrc</filename> file. For a system-wide configuration, place it in <filename>/etc/procmailrc</filename>:</para>
         <screen>
@@ -1349,20 +1357,18 @@ poll mail.domain2.com
           <para>Self-signed certificates should be used for testing purposes only. Any server used in a production environment should use an SSL certificate granted by a CA.</para>
         </warning>
         <para>To create a self-signed SSL certificate for <systemitem class="protocol">IMAP</systemitem>, change to the <filename>/etc/pki/tls/certs/</filename> directory and type the following commands as root:</para>
-        <screen>
-<command>rm -f cyrus-imapd.pem; make cyrus-imapd.pem</command>
-        </screen>
+        <screen>~]#&#160;<command>rm -f cyrus-imapd.pem; make cyrus-imapd.pem</command>
+        </screen> 
         <para>Answer all of the questions to complete the process.</para>
         <para>To create a self-signed SSL certificate for <systemitem class="protocol">POP</systemitem>, change to the <filename>/etc/pki/tls/certs/</filename> directory, and type the following commands as root:</para>
-        <screen>
-<command>rm -f ipop3d.pem; make ipop3d.pem</command>
-        </screen>
+        <screen>~]#&#160;<command>rm -f ipop3d.pem; make ipop3d.pem</command>
+        </screen> 
         <para>Again, answer all of the questions to complete the process.</para>
         <important>
           <title>Important</title>
           <para>Please be sure to remove the default <filename>imapd.pem</filename> and <filename>ipop3d.pem</filename> files before issuing each <command>make</command> command.</para>
         </important>
-        <para>Once finished, execute the <command>/sbin/service xinetd restart</command> command to restart the <command>xinetd</command> daemon which controls <command>imapd</command> and <command>ipop3d</command>.</para>
+        <para>Once finished, execute the <command>service xinetd restart</command> command as root to restart the <command>xinetd</command> daemon which controls <command>imapd</command> and <command>ipop3d</command>.</para>
         <para>Alternatively, the <command>stunnel</command> command can be used as an SSL encryption wrapper around the standard, non-secure daemons, <command>imapd</command> or <command>pop3d</command>.</para>
         <para>The <command>stunnel</command> program uses external OpenSSL libraries included with &MAJOROS; to provide strong cryptography and protect the connections. It is best to apply to a CA to obtain an SSL certificate, but it is also possible to create a self-signed certificate.</para>
         <note>
@@ -1373,19 +1379,16 @@ poll mail.domain2.com
         </note>
         
         <para>To create a self-signed SSL certificate, change to the <filename>/etc/pki/tls/certs/</filename> directory, and type the following command:</para>
-        <screen>
-<command>make stunnel.pem</command>
-        </screen>
+        <screen>~]#&#160;<command>make stunnel.pem</command>
+        </screen> 
         <para>Again, answer all of the questions to complete the process.</para>
         <para>Once the certificate is generated, it is possible to use the <command>stunnel</command> command to start the <command>imapd</command> mail daemon using the following command:</para>
-        <screen>
-<command>/usr/sbin/stunnel -d 993 -l /usr/sbin/imapd imapd</command>
-        </screen>
+        <screen>~]#&#160;<command>/usr/sbin/stunnel -d 993 -l /usr/sbin/imapd imapd</command>
+        </screen> 
         <para>Once this command is issued, it is possible to open an <systemitem class="protocol">IMAP</systemitem> email client and connect to the email server using SSL encryption.</para>
         <para>To start the <command>pop3d</command> using the <command>stunnel</command> command, type the following command:</para>
-        <screen>
-<command>/usr/sbin/stunnel -d 995 -l /usr/sbin/pop3d pop3d</command>
-        </screen>
+        <screen>~]#&#160;<command>/usr/sbin/stunnel -d 995 -l /usr/sbin/pop3d pop3d</command>
+        </screen> 
         <para>For more information about how to use <command>stunnel</command>, read the <command>stunnel</command> man page or refer to the documents in the <filename>/usr/share/doc/stunnel-<replaceable>&lt;version-number&gt;</replaceable>
           </filename>/ directory, where <replaceable>&lt;version-number&gt;</replaceable> is the version number for <command>stunnel</command>.</para>
       </section>


More information about the docs-commits mailing list