• No results found

Tracing the Email Delivery Process

 Before understanding E-mail process we will understand some basic concepts about E-mail.

1) Email :

i) Email message, just like a letter sent through regular mail, begins with a sender and ends with a recipient.

ii) We use TCP/IP protocols to accomplish E-mail service on internet. 2) Email Programs :

i) A Mail User Agent (MUA) for users to be able to read and write e-mail. ii) A Mail Transfer Agent (MTA) to deliver the e-mail messages between

computers across a network.

iii) A Local Delivery Agent (LDA) to deliver messages to users’ mailbox files. iv) An mail notification program to tell users that they have new mail.

Email Delivery Process : 1) Mail User Agent (MUA)

i) To be able to send mail, you, or your users, need a program called a Mail User Agent (MUA). The MUA, also called a mail client, enables users to write and read mail messages.

ii) Two types of MUAs are available: a graphical user interface (GUI), such as Netscape Messenger, and a command-line interface, such as Pine.

www.myitweb.weebly.com

2) Mail Transfer Agent (MTA)

i) Whether your MUA is a GUI or command-line interface, after the message is composed, the MUA sends it to the mail transfer agent (MTA).

ii) The MTA is the program that sends the message out across the network and does its work without any intervention by the user.

iii) The MTA installed by default on your Red Hat system is called Sendmail. iv) The MTA reads the information in the To section of the e-mail message

and determines the IP address of the recipient’s mail server. v) Then the MTA tries to open a connection to the recipient’s server

through a communication port, typically port 25.

vi) If the MTA on the sending machine can establish a connection, it sends the message to the MTA on the recipient’s server using the Simple Message Transfer Protocol (SMTP).

3) Local Delivery Agent (LDA)

i) After the LDA receives the message from the MTA, it places the message in the receiver’s mailbox file that is identified by the username.

ii) On your Red Hat system this is a program called procmail. The location

of the user’s mailbox file is

/usr/ spool/mail/<user’s name>.

iii) The final step in the process happens when the user who is the intended receiver of the message reads the message. The user does this using the MUA on his or her PC.

www.myitweb.weebly.com

4) Mail Notifier

(1) An optional program is a mail notifier that periodically checks your

mailbox file for new mail. If you have such a program installed, it notifies you of the new mail.

(2) If new mail has arrived, the shell displays a message just before it displays the next system prompt. It won’t interrupt a program you’re running.

(3) You can adjust how frequently the mail notifier checks and even which mailbox files to watch.

(4) If you are using a GUI, there are mail notifiers available that play sounds or display pictures to let you know that new mail has arrived.

www.myitweb.weebly.com

Using the Postfix Mail Server

1. Postfix is a mail transport agents used every day at sites that handle thousands and tens of thousands of messages per day.

2. The best part is that Postfix is fully compatible with Sendmail at the command level.

3. The similarity is deliberate, for Postfix was designed to be a high- performance, easier-to-use replacement for Sendmail.

Switching to Postfix

1. By default, Fedora Core and RHEL use Sendmail, Switching to Postfix is

simple, but before doing so, stop Sendmail:

# service sendmail stop

2. The next step is to make sure the Postfix is installed

$ rpmquery postfix

postfix—2.2.2-2

Configuring Postfix

1. The configuration file is /etc/postfix/main.cf . The following variables need to be checked or edited

a. Domain name:

mydomain =example.com

b. Local machine domain:

myhostname=coondog.example.com

c. Domain name appended to unqualified addresses

myorigin=$mydomain

www.myitweb.weebly.com

d. The mydestination variable tells Postfix what addresses it should deliver locally.

mydestination=$myhostname, localhost, localhost.$mydomain

2. Postfix supports a larger number of configuration variables than the four just listed, but these are the mandatory changes you have to make. 3. Create or modify /etc/aliases file : At the very least, you need aliases for

Postfix, postmaster, and root in order for mail sent to those addresses to get to a real person.

Example :

postfix: root postmaster: root root: bubba

4. After creating or modifying the aliases file, regenerate the alias database

using Postfix’s newaliases command.

/usr/sbin/newaliases

5. The last step is to start Postfix: # service postfix start

www.myitweb.weebly.com

Using SFTP

1. As an alternative to configuring vsftpd to play nicely with SSL, you can use sftp-server a program that is part of the OpenSSH (Secure Shell) suite of secure client and server programs.

2. Sftp-server implements the server-side portion of the FTP protocol. 3. In ordere to use sftp you need to have the OpenSSH related packages

installed.

The following query checks whether sftp package is installed or not:

rpmquery openssh {,-{clients, askpass,server}}

O/P If installed Openssh—4.opl-2 ………….

Openssh-server-4.opl-2

4. Next step is to make sure the following line appears in /etc/ssh/sshd_config:

Subsystem sftp /usr/libexec/openssh/sftp-server

5. This directive tells sshd to execute the program /usr/libexec /openssh/sftp-

server to service the SFTP subsystem.

6. Finally restart the SSH daemon using the following command:

# service sshd restart

7. Important difference between clear-text FTP and secure FTP is that sftp does not support anonymous FTP; users will always be prompted to provide a password unless they have set up SSH keys.

8. But you can configure vsftpd to provide anonymous FTP and then use OpenSSH to provide secure, authenticated FTP service for users that have valid accounts on the system. The two services can exist side by side because sftp uses port 115 and FTP uses ports 25.

www.myitweb.weebly.com

Advanced FTP Server Configuration