Lab Questions


Lab 1

1. 

Configure Thunderbird or Evolution to read your e-mail. You can set it up to read e-mail without downloading it from the server (even if it's a POP3 server).

Run the mail command as the root user. Browse through available e-mails. Normally, you should have more than a few based on issues such as bad logins and logwatch jobs.

Review the appropriate mail server spool and log files. Current Postfix mail log messages can also be found in /var/log/maillog.

image from book

Answers

1. 

This should be a trivial lab for most users. Anyone who is preparing for the RHCE exam should already know how to configure GUI e-mail clients such as Thunderbird and Evolution. This part of the lab is designed to get you to think about what these e-mail clients do and how you can configure e-mail clients.

But there is more. The mail command opens the e-mail client of the same name. It's already linked to mails in the local account, collected in /var/spool/mail/USERNAME.

When you review log messages in /var/log/maillog, you may see some errors. For example, if you see something similar to this,

 fatal: bind 0.0.0.0 port 25: Address already in use 

both sendmail and Postfix may be running on the same system. Note messages that direct e-mails to specific addresses.

Lab 2

2. 

Configure a Dovecot server with support for regular and secure POP3 and IMAP4 services. Create appropriate SSL certificates in default directories, based on your location.

image from book

Answers

2. 

This lab assumes you haven't protected access with a firewall, tcp_wrappers, or SELinux, as described in Chapter 15. One way to perform this lab is with the following steps:

  1. Make sure the dovecot RPM is installed. Open /etc/dovecot.conf, and activate the following directive:

     protocols = imap imaps pop3 pop3s 

    As this is the default, activating this directive isn't absolutely necessary. However, it's a good practice, as you never know when defaults change.

  2. Move or rename the default Dovecot security certificates, both named dovecot.pem, from the /etc/pki/dovecot/certs and /etc/pki/dovecot/private directories.

  3. Configure the Dovecot SSL configuration file, dovecot-openssl.cnf, in the /etc/pki/dovecot directory.

  4. Back up the default dovecot.pem files from the /etc/pki/dovecot/certs and /etc/pki/dovecot/ private directories.

  5. Make sure the associated script, mkcert.sh in the /usr/share/doc/dovecot-versionnum/examples/directory, is executable, and then run it:

     # /usr/share/doc/dovecot-versionnum/examples/mkcert.sh 

  6. Make sure your new certificates are available in the previously noted directories, /etc/pki/ dovecot/certs and /etc/pki/dovecot/private.

  7. Activate the Dovecot service, and make sure it runs the next time you reboot:

     # service dovecot start # chkconfig dovecot on 

Lab 3

3. 

Set up a sendmail mail server for your network. First, make sure to disable local-only access in the /etc/mail/sendmail.mc file. Add your network to the /etc/mail/access file. Test the results, preferably from a remote computer on your network.

Set up two users on your system. You can use existing users. For the purpose of this lab, assume these users are linus and bill. Make sure e-mail is forwarded from bill to linus.

Make sure to start the sendmail server now, and see that it starts automatically the next time you reboot your computer.

image from book

Answers

3. 

In sendmail, to disable local-only access in the /etc/mail/sendmail.mc file, comment out the following line. Unlike most Linux configuration files, the comment code is a dnl at the start of this line:

 DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl 

The dnl at the end of the line does not affect the command to its left.

Next, you'll want to enable support through /etc/mail/access. If you want to support your LAN with this server, and its network address is 10.11.12.0, you'd add the following command line to /etc/mail/access:

 10.11.12             RELAY 

Make sure sendmail is active (and any alternative mail servers such as Postfix are not).

You can test the results from the e-mail client of your choice. It's quickest to use a client such as mail. This assumes you've already configured Dovecot as described in Lab 2.

Alternatively, if you're configuring a GUI client, you'll need to know the name of your incoming mail server, whether it conforms to the POP3 or IMAP4 protocols, and the name (and password) of your account. You presumably already know the name of the outgoing mail server, the name of the computer with the mail server that you just configured.

To check incoming e-mails, look at /var/log/maillog. If all is well, you should see an entry sending your message to linus@yourcomputer. You should also see an update to user linus's mail spool, in /var/spool/mail. Unless user linus has already checked his e-mail, you should be able to read it yourself in /var/spool/mail/linus.

Lab 4

4. 

Set up a Postfix mail server for your network. Test the results, preferably from a remote computer on your network. Retain the forwarding from Lab 2, where e-mail addressed to user bill is forwarded to user linus. Connect to a remote system, and send e-mail to user bill.

image from book

Answers

4. 

In Postfix, to disable local-only access in the /etc/postfix/main.cf file, change the inet_interfaces directive to accept all connections:

 inet_interfaces = all 

Make sure Postfix is active (and any alternative mail servers such as sendmail are not).

You can test the results from the e-mail client of your choice. It's quickest to use a client such as mail. This assumes you've already configured Dovecot as described in Lab 2.

The process of checking incoming e-mails is the same as that for the previous lab. Look at /var/log/maillog. If all is well, you should see an entry sending your message to linus@yourcomputer. You should also see an update to user linus's mail spool, in /var/spool/mail. Unless user linus has already checked his e-mail, you should be able to read it yourself in /var/spool/mail/linus.



RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302)
Linux Patch Management: Keeping Linux Systems Up To Date
ISBN: 0132366754
EAN: 2147483647
Year: 2004
Pages: 227
Authors: Michael Jang

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net