Install and Configure A Mail Server: Sendmail: Dr. Anuradha Jayakody

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 25

Install and Configure a Mail

Server : Sendmail

DR. ANURADHA JAYAKODY


1
Mail Server
How Mail Server Works
Mail Server Protocols
SMTP (Simple Mail Transfer Protocol)
Content Sendmail
Sendmail Installation
Limitations
Conclusion
References
2
Mail Server
 A mail server (also known as a mail transfer agent or MTA, a mail
transport agent, a mail router or an Internet mailer) is an application that
receives incoming e-mail from local users (people within the same
domain) and remote senders and forwards outgoing e-mail for delivery.
 A computer dedicated to running such applications is also called a mail
server.

3
HOW MAIL
SERVER
WORKS

4
Mail Transport Protocols
 SMTP (Simple Mail Transfer Protocol)

Mail Access Protocols


Mail Server   POP3 (Post Office Protocol 3)
Protocols   IMAP (Internet Message Access Protocol)
  Dovecot : Mail Delivery Agent

5
SMTP (Simple Mail Transfer Protocol)
 SMTP (Simple Mail Transfer Protocol) is a TCP/IP protocol used in sending and
receiving e-mail.
 However, since it is limited in its ability to queue messages at the receiving end, it is
usually used with one of two other protocols, POP3 or IMAP, that let the user save
messages in a server mailbox and download them periodically from the server.
 Users typically use a program that uses SMTP for sending e-mail and either POP3 or
IMAP for receiving e-mail.
 On Unix-based systems, Sendmail is the most widely-used SMTP server for e-mail.

6
POP3 (POST OFFICE PROTOCOL 3)

 Post Office Protocol version 3 (POP3) is a standard mail protocol used to receive emails from a remote server to a
local email client. POP3 allows you to download email messages on your local computer and read them even
when you are offline.
 POP3 is used to retrieve e-mail from a remote server to the local client. POP3 uses TCP on port 110

7
 IMAP (INTERNET MESSAGE ACCESS PROTOCOL)

 In computing, the Internet Message Access Protocol (IMAP) is an Internet standard protocol used by email clients to
retrieve email messages from a mail server over a TCP/IP connection. IMAP is defined by RFC 3501. ... An IMAP
server typically listens on port number 143.
 What is the difference between IMAP and pop3 email protocols?
 IMAP is more flexible and complex than POP3. POP is a simple protocol that only allows downloading messages from your
Inbox to your local computer. IMAP is much more advanced and allows you the user to see all the folders on the mail server. ...
In POP3 the mail can only be accessed from a single device at a time.

8
MAIL DELIVERY AGENT

 A mail delivery agent or message delivery agent (MDA) is a computer software component that is responsible for
the delivery of e-mail messages to a local recipient's mailbox. It is also called a local delivery agent (LDA).
 What is a mail agent?
 Within the Internet email system, a message transfer agent or mail transfer agent (MTA) or mail relay is software that
transfers electronic mail messages from one computer to another using SMTP. ... These servers also often keep mailboxes for
email.
 What is MTA and MDA?
 An MTA, or Message Transfer Agent (a.k.a., Mail Transfer Agent) is the software and other systems that are responsible for
sending and receiving mail between systems. ... Sometimes imprecisely (and confusingly) also called a "mail client". An
LDA is a Local Delivery Agent. An MDA is a Mail Delivery Agent.

9
Sendmail
 Sendmail is a general purpose email routing facility used for email
transport over the Internet.
 It includes SMTP for the mail-transfer and email delivery.
 Most of the system administrators preferred to use Sendmail server as
MTA than other MTAs.
 Sendmail server can be used to send the email via external SMTP servers
like Gmail, Amazon SES, MailChimp etc.
10
Sendmail Installation

1) Install Sendmail
1. To install the Sendmail, login with the privileged mode (root user).

2. Install Sendmail by using the ‘yum install sendmail’ command.


11
3. Then wait until the installation process completes.
Sendmail Installation

12
4. Change the directory to ‘mail’ directory and check whether the ‘sendmail.mc’ file is
Sendmail Installation
there.

5. Then open the file using the ‘vi editor’, to configure the ‘sendmail.mc’.

6. Search for 127.0.0.1 line and change the port as ‘smtp’.

13
7. Check the status of Sendmail.
Sendmail Installation
8. Then start the Sendmail service.

9. Add the Sendmail service to ‘chkconfig list’ to automatically start at the boot time.

14
2) Install and Configure Dovecot
Sendmail Installation
 Dovecot is an open source IMAP and POP3 email server for Linux/UNIX-like systems,
written with security primarily in mind.
 It is an excellent choice for both small and large installations.
 It's fast, simple to set up, requires no special administration and it uses very little
memory.
1. Install Dovecot using the ‘yum install dovecot’ command.

2. Then wait until the installation process completes.

15
3. Open the ‘dovecot.conf’ file.
Sendmail Installation
4. Then uncomment line number 24 and change it as ‘Protocols = imap pop3 lmtp’.

5. Then check the status of the dovecot.

16
6. Then start the dovecot service.
Sendmail Installation

7. Add the dovecot service to ‘chkconfig list’ to automatically start at the boot time.

17
8. Use the below command to check whether the mail server is working.
Sendmail Installation

18
3) Install Mailx
Sendmail Installation
 Mailx is a Unix utility program for sending and receiving mail, also known as a Mail
User Agent program.
1. Use the below command to install Mailx.

2. Wait until the installation process completes.

19
4) Send and Receive a Mail
Sendmail Installation
1. Check whether there are any received mails.

2. Create a new user and send a mail to that user, by using the following commands.

3. Check whether the new mail is received.

20
4. To view the content of the mail, use the below command.
Sendmail Installation

21
Limitations
 Security matters for SMTP are worse.
 Its usefulness is limited by its simplicity.
 Transmission of binary files using SMTP is not possible without
converting into text files.
 Use MIME to send mail in other format. It is limited to 7-bit ASCII
characters only.
 SMTP servers may reject mail messages beyond some specific length.
22
Conclusion

 Sendmail is a general-purpose internetwork email routing facility that


supports many kinds of mail-transfer and delivery methods, including the
Simple Mail Transfer Protocol (SMTP) used for email transport over the
Internet.

23
References
[1] “What is mail server (mail transfer/transport agent, MTA, mail router, Internet mailer)? - Definition
from WhatIs.com.” [Online]. Available: https://searchmicroservices.techtarget.com/definition/mail-
server-mail-transfer-transport-agent-MTA-mail-router-Internet-mailer. [Accessed: 10-May-2019].
[2] “Dovecot,” Dovecot. [Online]. Available: https://www.dovecot.org/. [Accessed: 10-May-2019].
[3] “Mailx,” 05-May-2019. [Online]. Available: https://en.wikipedia.org/wiki/Mailx. [Accessed: 10-May-
2019].
[4] “Mail Servers.” [Online]. Available: https://docs.fedoraproject.org/en-US/fedora/rawhide/system-
administrators-guide/servers/Mail_Servers/. [Accessed: 10-May-2019].

24
Thank You

25

You might also like