Question

In: Computer Science

Configuring Mail services in Linux In this lab we will examine how to configure mail server...

Configuring Mail services in Linux

In this lab we will examine how to configure mail server (Sendmail, Dovecot and Spamassassin) services under Linux.

PART 1: Configuring the sendmail Mail Transport Agent (MTA) to provide Mail server services

Boot your system into the Fedora Linux server VM used in lab 3 to configure DNS and follow the procedure outlined below to configure your system as a Mail server using the sendmail MTA.

  • Log in as usual and make sure that the Ethernet (ens33) bridged network interface is enabled.
  • Since the sendmail packages are not installed by default on the system (to verify this type rpm -qa | grep sendmail at the command prompt), issue the command (as root)

dnf install sendmail sendmail-cf to install the latest versions of these packages.

  • Next, using the applet on the top right of the desktop, disable the Ethernet (ens33) interface (we do this to avoid having your ISP DNS server appear in the system configuration). Make sure the Ethernet (ens37) interface is configured with a static IP address as you did in part 1 of lab 3 (i.e. 192.168.100.10 with mask 255.255.255.0); also make sure that the DNS server address is set to 192.168.100.10 (i.e. the localhost). Turn off and re-enable the ens37 interface for the changes to take effect. If necessary, refer to lab 3 for details on configuring interface settings.
  • Make sure that the BIND DNS server configuration is completed as described in part 2 of lab 3. In addition, using the BIND configuration GUI, add an MX record entry to the nspdomN.local forward zone. To do this, right-click the nspdomN.local zone and select Add – MX Mail Exchange. In the MXMail Exchange window, enter the Mail Server Name as F24server.nspdomN.local. (including the trailing period, N is your unique number) and click OK. Click Save on the toolbar and then click Yes to save the changes you have made. Restart the DNS service by typing systemctl restart named.service.
  • To set up the Mail server we first have to configure the file /etc/mail/sendmail.mc (we do not want to edit the configuration file /etc/mail/sendmail.cf directly since errors in this file can create problems) and then start the service. Open a terminal window as root, and back up the existing configuration file by typing

cp /etc/mail/sendmail.mc /etc/mail/sendmail.mc.bak. Also, back up the sendmail.cf file using a similar command.

NOTE: Usually, the sendmail service is configured to start automatically at boot, so you only have to restart the service when making changes to the configuration files.

  • Using the gedit editor, edit the /etc/mail/sendmail.mc file and make the following changes:
  1. Change the domain name specified in the LOCAL_DOMAIN directive from localhost.localdomain to nspdomN.local (with no trailing period).

  1. The default configuration file does not allow sendmail to accept network connections from any other host other than the local computer. To configure sendmail as a server for other clients, completely remove the Addr=127.0.0.1 option of the DAEMON_OPTIONS directive.

NOTE: If you would like sendmail to accept connections from the local subnet only, you need to change the address in the Addr= option to the IP address of the ens8 interface (i.e. Addr=192.168.100.10). DO NOT MAKE THIS CHANGE!

  1. To have sendmail masquerade other host names on the network, so that their return address is [email protected] instead of [email protected] (this is useful when a single machine acts as a mail gateway for all machines on the network and assigns a consistent return address to all outgoing mail), uncomment (i.e. remove the letters dnl in front of) the MASQUERADE_AS directive, and change the name in this directive from mydomain.com to nspdomN.local. Also uncomment the lines FEATURE(masquerade_envelope) and FEATURE(masquerade_entire_domain) and add the directive MASQUERADE_DOMAIN(.nspdomN.local)dnl.

  1. DO NOT MAKE THIS CHANGE AS IT MAY PREVENT SENDMAIL FROM WORKING – JUST READ IT!

As configured by default, sendmail accepts e-mail from domains that it cannot resolve (and that may not exist). To turn this feature off and cut down the amount of spam you receive, add dnl to the beginning of the following line:

FEATURE(`accept_unresolvable_domains’)dnl

When this feature is off, sendmail uses DNS to look up the domains of all e-mails it receives. If it cannot resolve the domain, it rejects the e-mail.

NOTE: Please refer to page 743 – 752 in Sobell and chapter 10 of the Fedora 22 system administrator guide for more details.

  • Finally we need to specify which systems the local server relays e-mail for. To do this edit the file /etc/mail/access and add the line

Connect:192.168.100.                       RELAY

at the end of the file. This line will allow the server to relay outbound e-mail for all hosts on the local virtual subnet.

  • To enable and start the sendmail service enter the command systemctl enable sendmail.service followed by systemctl start sendmail.service.
  • The Mail server should now be functional. Test this by opening a terminal as user student and sending e-mail to the user itself. Type echo “my sendmail test” | /sbin/sendmail [email protected]

and then type less /var/spool/mail/student and scroll to the bottom of the file to see if the new message has been appended to the student mail spool file.

WHAT TO SUBMIT: Capture of system-config-bind GUI on Linux server showing MX record added. Capture of Linux server terminal window showing output of echo command above.

2 captures total.

Solutions

Expert Solution

In my explanation i upload my answer and i hope you better understand sir.

All answer page mention page number so read accourding to page number


Related Solutions

Challenge Lab 8-1: Configure Network Settings in Hyper-V Your Windows Server 2012 R2 server is installed...
Challenge Lab 8-1: Configure Network Settings in Hyper-V Your Windows Server 2012 R2 server is installed in a VM named VMTest1 that you created in the hands-on projects. You are ready to perform post-installation tasks. One of the things you will need to do is configure the virtual network. Do a little research on configuring the virtual network in Hyper-V. Open Hyper-V Manager and study the configuration tasks you can perform in the Actions pane. You should configure the virtual...
For a Linux server: • how to Set up a print server (CUPS), allow clients to...
For a Linux server: • how to Set up a print server (CUPS), allow clients to connect, print to PDF • Create a script that backs up the printed documents every 6 hours please can you help me
3.13 LAB: Extracting Passwords (files and lists) The Linux operating system is a very popular server...
3.13 LAB: Extracting Passwords (files and lists) The Linux operating system is a very popular server OS. A network administrator has to protect the login/password files stored on the servers. In Linux there are two important files: /etc/passwd And it contains rows that look like this: root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin user1:x:15:51:User One:/home/user1:nologin user2:x:15:51:User One:/home/user1:nologin user3:x:15:51:User One:/home/user1:nologin This file contains login information. It's a list of the server's accounts that has userID, groupID, home directory, shell and more info....
Windows Server 2016 - Configuring Advanced Storage Solutions - Discuss how the implementation of advanced storage...
Windows Server 2016 - Configuring Advanced Storage Solutions - Discuss how the implementation of advanced storage technology, such as that which is found in Windows Server 2016, may eliminate or reduce the need for larger storage hardware such as a SAN. Discuss the differences between Storage Replica and Data Deduplication. How are they complementary? How might they generate conflicting output?
lab of operating system: you should do this on linux server its mandatory please show your...
lab of operating system: you should do this on linux server its mandatory please show your work by taking screenshot and show all the commands performed and show the result. PROBLEM 1: Create a file and name it f1 • Cerate a directory and name it d1 • Move f1 to d1 • Create a directory and name it d2 • Move d1 to d2 • Check if d1 is inside d2 • Check if f1 is inside d1 •...
USING COMMAND PROMPT ON LINUX. show how... Linux Users, Groups, and Permissions Lab Objective: Understand how...
USING COMMAND PROMPT ON LINUX. show how... Linux Users, Groups, and Permissions Lab Objective: Understand how to create user accounts Understand how to create group accounts Creating good password policies Understanding permissions and file sharing Setup: You will need a Ubuntu Server VM Walk Through: You are a system administrator who has been tasked to create user accounts for new users on your system. You can pick whatever theme you like as long as there are protagonist and antagonist users:...
discuss how using VirtualBox and the Linux LAMP server represents cloud computing. And, discuss what a...
discuss how using VirtualBox and the Linux LAMP server represents cloud computing. And, discuss what a cloud consumer needs to know about how virtualization and cloud computing creates value for a business. In addition, for the second part of the discussion, make sure you mention virtualization security.
We perform a statistical test to examine if the mean lifetime of lab mice increases when...
We perform a statistical test to examine if the mean lifetime of lab mice increases when given vitamin B12 compared to a placebo. Which of the following is a Type I error? Conclude that Vitamin B12 increases the mean lifetime when in fact it does. Conclude that Vitamin B12 does not increase the mean lifetime when in fact it does not. Conclude that Vitamin B12 increases the mean lifetime when in fact it does. Conclude that Vitamin B12 increases the...
Creating an e-mail Message Class e-mail. How we often communicate today…from Christmas lists, to pick up...
Creating an e-mail Message Class e-mail. How we often communicate today…from Christmas lists, to pick up from the store lists, to-do lists, to one-liner messages…all examples of communication using an e-mail message. Lab Assignment Objectives Understand what is meant by a class object's type and how the type determines the operators and methods that can be applied to the object. Know what a constructor does. Understand how a class corresponds to a namespace such that object method invocations translate to...
we are going to thoroughly discuss the business drivers for using Windows Server and how it...
we are going to thoroughly discuss the business drivers for using Windows Server and how it enables the business to be more efficient and effective (and therefore more successful and profitable). But first we have to understand what exactly Windows Server is. Let's start this discussion by defining what server actually means, what features are included in Windows Server, and how it is packaged and sold by Microsoft to different customers. After this, we'll get into the business requirements and...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT