Linux Unit 4
Linux Unit 4
7. Explain: Mail Transfer Agent, Mail Delivery Agent, Mail User Agent with examples.
Ans:
➖
Mail Transfer Agent:
➖
A mail transfer agent or mail relay transfers email messages from one computer to another.
An MTA is responsible for the core tasks involved with delivering of email, including: queuing,
throttling, scheduling, connection management, data transfer, processing of deferrals, bounce generation
➖
and tracking of delivery status.
A Mail Transport Agent (MTA) transports email messages between hosts using SMTP. A message
➖
may involve several MTAs as it moves to its intended destination.
The major functions of an MTA are:
➖Accepting messages originating from the user agent and forwarding them to their destination.
➖Receiving all messages that are transmitted from other user agents for further transmission.
➖Keeping track of each and every activity and analyzing and storing the recipient list to perform future
➖Sending auto-responses about non-delivery when a message does not reach its intended destination
routing functions.
➖The recipient's MTA then delivers the email to the incoming mail server (called the MDA, for Mail
Mail Delivery Agent:
➖There are two main protocols used for retrieving email on an MDA:
Delivery Agent), which stores the email as it waits for the user to accept it.
➖POP3 (Post Office Protocol), the older of the two, which is used for retrieving email and, in certain
➖IMAP (Internet Message Access Protocol), which is used for coordinating the status of emails (read,
cases, leaving a copy of it on the server;
➖
completed.
MDAs act as mailboxes, which store messages (as much as their volume will allow) until the recipients
➖
check the box. It is also called as LDA (Local Delivery Agent).
MDA is protected by a user name called a login and by a password.
➖
Mail User Agent:
A Mail User Agent (MUA) is a program that, at the very least, allows a user to read and compose email
➖
messages.
An MUA is often referred to as an email client. Of course, many MUAs help users do more than that,
including retrieving messages via the POP or IMAP protocols, setting up mailboxes to store messages, or
➖
helping present new messages to a Mail Transfer Agent that will deliver them to their final destination.
It is the responsibility of users to install an MUA, which allows them to work with email on their
➖
computer, tablet, or smartphone
It is called an email client (such as Mozilla Thunderbird, Microsoft Outlook, Eudora Mail, Incredimail or
➖
Lotus Notes & Mutt Tool).
➖
When it is a web interface used for interacting with the incoming mail server, it is called webmail.
An MUA is a program that, at a minimum, allows a user to read and compose email messages
8. Explain the various parameters for secure internet configuration of Postfix server.
Ans
1) There are a few more steps to take to configure a mail server, which is going to handle messages from
the Internet.
• myhostname This parameter specifies the name of this host. If not specified, it is set to the full DNS
domain name (FQDN) of this host. This parameter is used as a variable in other parameters in the
main.cf file, so it is useful to set it.
• mydomain This parameter specif es the domain of this host. If not set, the domain name part of the
FQDN is used.
• myorigin This parameter determines the domain seen by the email recipient when receiving messages.
The default is to use the FQDN of this host. This means that if user linda on server dfw.example.com
sends a message, the recipient will see a message coming in from linda@dfw.example.com. This is often
not what you want. To append the domain name only and not the entire FQDN, use myorigin =
$mydomain.
• inet_interfaces This parameter specifi es the IP addresses of the mail server to which it binds. By
default, it is set to localhost only, which means that your mail server cannot receive messages from the
Internet. This is fi ne if the mail server only has to send messages and another server is used for email
reception. However, you’ll normally want to enable all inet_interfaces using inet_interfaces = all.
•mynetworks This parameter is optional. You can use it to specify the network address from which your
MTA accepts messages for relaying without further authentication. It’s a good idea to set this to your
trusted network.
• relayhost This parameter contains the name of a host that is used to relay all messages to. Use this if,
for example, you want the mail server of your ISP to take care of all message delivery.
10. Write down the steps to configure Apache for basic website services.
Ans
1) Configuring an Apache server that services just one website is not hard to do—you just have to install
the Apache software and create some content in the Apache document root.
2) The default document root is set to /var/www/html on a Red Hat Enterprise Linux server. Just put a file
in this directory with the name index.html, and it will be served by your Apache server.
Creating a Basic Website
1. Use yum -y install httpd to install the Apache web server.
2. Use chkconfig httpd on to put the Apache web server in your server’s runlevels, and have it star t at
boot in your runlevels.
3. Open a root shell, and go to the directory /var/www/html. In this directory, create a file with the name
index.html. In this file, put the content “ welcome to my website” and then use service httpd start to star t
the Apache web server.
4. Still from the root shell, use elinks http://localhost to access the website you just created. You’ll notice
that your web server is up and running!
11. What are modes of Apache? Explain some performance parameters for these modes.
Ans
1) Apache can be started in two different modes:
1. prefork mode
2. worker mode
The prefork mode is the default mode. In this mode, a master httpd process is started, and this master
process will start different httpd servers.
Even if the worker mode is a bit more efficient with regard to resource usage, some modules cannot
handle it, and therefore the prefork mode is used as default.
However, if you need the best performance that httpd can offer and you don’t use modules that are
incompatible with worker mode, it’s a good idea to use worker mode instead.
Worker mode can be configured to serve more simultaneous processes. To change the default mode that
Apache uses, you can modify the HTTPD parameter in /etc/sysconfig/httpd. To use the worker mode, you
have to start the /usr/sbin/httpd. worker binary instead of /usr/sbin/httpd.
To accomplish this, just remove the pound sign in front of the example line in /etc/sysconfig/httpd and
restart the httpd process using service httpd restart.
For both modes, you can set some performance parameters:
StartServers: This is the number of server processes httpd should always start.
MinSpareServers: This is the minimum amount of spare server processes that are kept. It is good to have
a certain minimum because it allows httpd to serve client requests really fast.
ServerLimit: This is the total amount of server processes that can be started as a maximum. Note that the
value of 256 is pretty high, and it should be sufficient for most servers.
MaxClients: This is the maximum number of clients that can be connected. Note that in worker mode,
one client can have several concurrent requests, which are opened simultaneously.
MinSpareThreads: In worker mode, this is the minimum amount of spare threads that httpd should keep.
You can see that it is set considerably higher than the MinSpare Servers parameter in prefork mode
12. Explain how the DirectoryIndex, Options, AllowOverride, and Orderdirectives in Apache.
Ans
1) DirectoryIndex : The administrator can also set different directory options on an Apache web server.
These options are used to define how the contents of a directory on the httpd server should bepresented
to users who access that directory
The DirectoryIndex directive can be used to specify that other fi les should also beconsidered. If this is
the case, it will show the contents of this fi le, and if not, a list of filesin the directory is shown.
To modify this behavior, the DirectoryIndex and Options directives can be used. Bydefault, the
DirectoryIndex directive specifies that Apache should look for a file with thename index.html or
index.html.var.
2) Options: The Options directive within a directory definition(as you can see in the /var/www/icons
directory statement) can further fine-tune the options that are used to display the contents of a directory.
You can also use Options to determine which server features are available in a particular directory.A
useful argument for the Options directive is Indexes.
Related to this option is Follow SymLinks. This option will ensure that symbolic links are followed if they
exist in the document directory. Don’t use this because it is considered a security threat.
3) AllowOverride: In a directory served by Apache, some basic restrictions can be used. First, there is
theAllowOverride directive.
If AllowOverride is set to none, the contents ofany .htaccess fi le that is found anywhere in a subdirectory
of the current directory will be ignored.
If you don’t want the owners of subdirectories to restrict access to their directories, set AllowOverride to
none. If you want to allow users to restrict access to subdirectories, set it to All.
In high-performance environments, don’t use it at all because this will force Apache to recurse through
the entire directory tree on every request.
4) Order directive: Another basic way to handle access restrictions is by using the Order directive. With
thisdirective, you’ll specify the order in which allow and deny commands are used
The default order is deny and then allow. This means that if a client is excluded by deny, it will be
excluded unless it matches allow. If neither is matched, the client gets access. As you see, this is a rather
open approach that doesn’t put many restrictions on a directory.