Difference between revisions of "Lab4b"

From CDOT Wiki
Jump to: navigation, search
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Category:OPS335]][[Category:OPS335 Labs]]
#REDIRECT [[OPS335_Lab_4b]]
Online References:
* [https://prezi.com/iuk-advzak_o/mail-servers-postfix/ OPS335 Mail Server Notes ] Course Note providing Concepts and Overview of mail server setup
* [http://www.fredshack.com/docs/postfix.html Postfix for Dummies] Good Basic Guide to setup Postfix MTA
* [http://www.simplehelp.net/2008/12/01/how-to-send-email-from-the-linux-command-line/ Mail Send Command] (examples how to send e-mail using mail command)
* [http://www.johnkerl.org/doc/mail-how-to.html#prompt_commands View and Manage Received e-mail Mesages] (Common commands to view and manage received email messages)
In order to send e-mail messages '''between your different VMs, a more complex set-up is required'''...
This lab will show you how to set up a '''Postfix''' email server ('''MTA''') on your '''VM2''' machine...
The '''diagram''' below shows the layout of the what this lab should be able to accomplish:
--- Newer Diagram ---
{{Admon/important|Prerequistites|<ol><li>Ensure <u>all</u> machines have been updated and that the '''clocks are set to the correct date and time'''.<br></li><li>Due to the changes made in this lab3, '''you will now need your vm1 running (as the DNS server)''' in order for any of your virtual machines to be able to use the internet.</li></ol>}}
=== Confirm Network Connections ===
Before proceeding with this lab, we need to confirm our machines have connectivity to the Internet before we can install and start sending e-mail messages.
'''Perform the following steps:'''
#Make certain that you can connect to the Internet on your '''Host Machine''' via web-browser.<br> Since your host should be using '''VM1''' as its '''DNS server''', you will need to make certain that the '''VM1''' machine is running as well.
#Start a web-browser on your '''Host Machine''', and access your Seneca e-mail account (https://myseneca.ca).
#Confirm that you can access the web from your '''VM2''' machine. You can install the '''wget''' or '''lynx''' applications in order to test this for your text-based server.
===Install and Configure Postfix Package (MTA) on a VM===
We will now be installing the '''postfix application''' which will act as the Mail Transfer Agent ('''MTA''') that will send e-mail messages to other e-mail servers.<br>In our case, between our servers '''vm2''' and an outside server which is your '''Seneca College''' email account (https://myseneca.ca).
'''Perform the following steps:'''
#Switch to your '''VM2''' machine.
#Check the status of the '''sendmail''' service by using the '''systemctl''' command.  If the sendmail service is running, use the ''systemctl'' command to stop and disable that service.
#Issue the following command to install the '''postfix''' application (MTA):<br>'''yum install postfix'''<br><br>
#What is the purpose of installing the postfix application in terms of using e-mail? Record your answer in your lab logbook.
#We need to <u>configure</u> our MTA (postfix application) to recognize our recently-created domain name that was created in lab3.<br>Edit the Postfix configuration file called '''/etc/postfix/main.cf''' replacing the existing contents with only the contents displayed below:<br><br>'''mydomain = senecaID.org'''<br>'''myorigin = $mydomain'''<br>'''mynetworks =, 192.168.X.0/24'''<br>'''relay_domains ='''<br>'''inet_interfaces=all'''<br><br>Your MTA has the ability to resolve "fake" public address to an actual user account name. For example, if you have a user account called "msaul", you can have the MTA resolve the fake name "murray.saul" to the account name "msaul". In order to do this, you will need to create an '''alias''' which is contained in the MTA's alias file.<br><br>
#Edit the '''/etc/postfix/aliases''' file and add your first name as an alias to be resolved to your VM2's account name:<br><br>'''your-first-name''' &nbsp; &nbsp; &nbsp; '''your-vm2-regular-username'''<br><br>
#In order to update the MTA's database for the newly-create alias, issue the following command:<br>'''postalias hash:/etc/aliases'''<br><br>
#Finally, to start and enable your MTA, issue the following commands:<br>'''systemctl start postfix.service'''<br>'''systemctl enable postfix.service'''<br><br>
#Check the '''/var/log/messages''' file to see that your MTA server started without error. If there are any errors, correct them before continuing.
'''Record steps, commands, and your observations in INVESTIGATION 1 in your OPS335 lab log-book'''
#What does the term MTA mean? What is the purpose of an MTA?
#What does the term MUA mean? What is the purpose of an MUA?
#Briefly list the steps to install and configure your MTA on your server.

Latest revision as of 22:01, 2 March 2016

Redirect to: