E mail
1 / 39

E-mail - PowerPoint PPT Presentation

  • Updated On :

E-mail One of the first methods for communicating over the Internet Protocol - SMTP (Simple Mail Transfer Protocol) Mail Transport Agent(MAT) - sendmail Sendmail In /etc/rd.init.d/sendmail.init … Echo -n “Starting sendmail: “ daemon sendmail -bd -q1h echo

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'E-mail' - Antony

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
E mail l.jpg

  • One of the first methods for communicating over the Internet

  • Protocol - SMTP (Simple Mail Transfer Protocol)

  • Mail Transport Agent(MAT) - sendmail

Sendmail l.jpg

  • In /etc/rd.init.d/sendmail.init …

Echo -n “Starting sendmail: “

daemon sendmail -bd -q1h


touch /var/lock/subsys/sendmail

Sendmail3 l.jpg

  • Why an email message in a queue?

    • On Dialup-only connection send a note During not connection.

    • The remote host is not dialed in

    • The remote host is down for upgrades or it crashed

    • No connection to the remote host

  • mailq command

Sendmail4 l.jpg

  • TCP port 25

[[email protected] ~ ] # telnet localhost 25


Connected to localhost.

Escape character is ‘^]’.

220 wayga.net ESMTP Sendmail 8.7.6/8.7.3; Fri, 18 Apr 1997 00:26:18 -


Sendmail configuration l.jpg
Sendmail Configuration

  • /etc/sendmail.cf

    • OA - Set another file that contains aliases

    • Mlocal - Specifies what program will act as the Mail Delivery Agent(MDA)

    • DS - Contains a pointer a “smart” relay host

    • Cw - with one Internet having multiple names specifies which hosts you will receive email

Using m4 files l.jpg
Using m4 Files

  • One option of the sendmail - automatically generates sendmail.cf (options you wish to use)

  • After upgrading, must recompile sendmail.cf

    • m4 macro language is excellent

  • m4 processor is /usr/bin by default

After email arrived l.jpg
After email arrived

  • Sendmail checks .forward file

    • if so, sendmail will forward the email

  • if procmail is used

    • run procmail

    • read .procmailrc file

    • follow rules

  • append the email

    • /var/spool/mail/<USER>

Etc aliases l.jpg

  • Incoming mail to a different user or program

MAILER_DAEMON: postmaster

postmaster: root

# General redirections for pseudo accounts.

bin: root

daemon : root

games: root

nobody: root

uucp: root

Etc aliases9 l.jpg

# Well-known aliases.

manager : root

operator: root

# Person who should get root’s mail

root: mark

mfk: mark

bren: brenda

bdk: brenda

After email arrived10 l.jpg
After email arrived

  • After mail is deliverd to an account

  • comsat process

    • tells the shells new mail

    • notify you of it

  • biff program

    • on - notification

    • off - no notification

Mua mail user agent l.jpg
MUA(Mail User Agent)

  • Program enable us to read/write emails

    • low-feature (mail)

    • high-feature

    • full-screen (elm,pine,mutt)

    • the graphical (Netscape)

Slide12 l.jpg

  • SMTP - Simple Mail Transfer Protocol

    • only 7-bit data (plain ASCII)

    • need some way of send binary 8-bit data

    • uuencode program

      • two bytes of 8-bit data into 7-bit data

    • drawbacks

      • larger size

      • remote side had to decode the data (uudecode)

Slide13 l.jpg

  • Multipurpose Internet Mail Extension (1990s)

    • encode each data type

    • .mailcap file

      • what file types

      • what applications to run

Forward file l.jpg
.forward File

  • When mail comes in, .forward file is checked

  • .forward

    • email address

    • command

      • for example, vacation program

Procmail l.jpg

  • If Mail Delivery Agent (MDA) = procmail

    • Mlocal entry in your sendmail.cf

    • filter all your incoming mail

  • If Procmail is not your local mail handler

    • make procmail the local mail handler

    • Run procmail periodically, or use cron to filter out an exising an mailbox

    • Put a reference to procmail in .forward file

Procmail16 l.jpg

  • .procmailrc file

    • three sectoins -- recipe


* ^From. *mark



* ^Subject:. *Flame


Mailing lists l.jpg
Mailing Lists

  • Lager groups of people to communicate via email

  • preferable to using USENET

  • control who subscribe

  • control content

Majordomo l.jpg

  • The best mailing list program

    • set up majordomo (perl5 m GCC is need on the system)

    • create a majordomo user

    • create a home directory for the majordomo user

      • /home/majordom

      • /usr/local/majordom

Majordomo19 l.jpg

  • Copy the mahordom1.94.tar.gz file to the home directory

  • uncompress/untar the file

  • modify majordomo.cf

    • additional file to handle aliases


Majordomo20 l.jpg

  • For example

Gastro: “|/home/majordom/wrapper resend -1 gastro


gastro-list: :include/home/majordom/lists/gastro

owner-gastro: mark

gastro-owner: mark

gastro-request: “|/home/majordom/wrapper

majordomo -1 gastro”

gastro-approval: mark

Majordomo21 l.jpg

  • initialize the lists

  • edit ~majordom/lists/gastro.config

    • all the configuration settings for the particular list

Echo “conf gastro gastro.admin” | mail majordomo

Qmail an alternative to sendmail l.jpg
Qmail : An alternative to Sendmail

  • Ease of use and security

  • need to a number of changes

Qmail l.jpg

  • Differences from sendmail in methodology

    • Mail file location

      • sendmail - /usr/spool/mail/user

      • qmail - ~usr/Mailbox (for better quota checking & fewer security problems)

    • Permissions

      • sendmail - almost runs by root or with root privileges

      • qmail - a qmail user when necessary

Qmail24 l.jpg

  • Mail list integration

    • sendmail - using majordomo, listproc program

    • qmail - create and administrate mailing lists by individual users

  • Size

    • sendmail - monolithic MTA

    • qmail - a number of smaller programs

Qmail25 l.jpg

  • Install Qmail

    • http://www.qmail.org/ - source or rpm file

    • uncompress the down file

    • resides in the /var/qmail

    • create users for qmail to use

    • make command to build qmail

Qmail26 l.jpg

  • After installation

    • .qmail file - cannot be group-, word-writable

    • checks for other copies of the sendmail program and changes those to use qmail

    • do some tests

      • mail is delivered to ~user.Mailbox instead of /usr/spool mail/usr

Qmail27 l.jpg

  • A few notes, if considering changing MTAs

    • if upgrading, changing s/w

      • then use a staging machine

    • if a dialup link, check out the serialmail program

      • send out email on demand

    • .qmail file is used instead of .forward file

      • better features are put in .qmail

Qmail28 l.jpg

  • Inform users ahead of time

    • mail is delivered to ~user/Mailbox

    • /etc/profile

      • check that mail environment variable is changed

      • /user/spool/mail approach has two problems

        • security risk

        • prone to losing mail if via NFS or server goes down

Qmail29 l.jpg

  • Look in .forward file instead of .forward file

  • not use /etc/aliases

    • ~alias/.qmail-markk contains [email protected]

  • root receive the mail by aliases

Ezmlm l.jpg

  • Package for easy mailing list set up

  • Functions - the same as other applications

    • automatic subscribe / unsubscribe

    • moderated lists

    • digest creation

  • Differences from other applications

    • no need for the mail list administrator

Ezmlm31 l.jpg

  • create mailing list

    • -P option : if want to create the mailing list that only the moderator can add and remove (private mailing list)

  • subscrkbes email to list

Ezmlm-make ~/list ~/.qmail-list user-list host

Ezmlm-sub ~/list email

Ezmlm32 l.jpg

  • Unsubscribes email from list

  • lists the members of list

  • ezmlm-idx - an extension to ezmlm

    • more moderation and providing

Ezmlm-unsub ~/list email

Ezmlm-list ~/list

Ezmlm files l.jpg
Ezmlm Files

  • Once mailing list is created, many files

    • Archive/

      • contains an archive of the mailing list

    • Archived

      • if exists, ezmlm will archive messages

    • Headeradd

      • containts a list of header that will be added

Ezmlm files34 l.jpg
Ezmlm Files

  • Headerremove

    • a list of headers that will be removed

  • Key

    • some random binary data to prevent forging subscription requests

  • Num

    • the number of messages

  • Test

    • files that ezmlm will send back as administrative message.

Remote email l.jpg
Remote Email

  • Two standards for receiving email from a remote machine

    • POP (Post Office Protocol)

    • IMAP (Internet Message Access Protocol)

  • Advantages

    • little user set up

Slide36 l.jpg

  • Simple

  • Advantage

    • pick up emails at the office from home

  • Disadvantage

    • email on the server is often deleted once it gets sent to

Slide37 l.jpg

  • Red Hat Distribution - imap-4.5 RPM

  • Regularly, user drives are backed up

    • email downloaded is stored on the local machine

  • Don’t Delete from server option

    • After email delivery, leave the email on the server

Slide38 l.jpg

  • Client/Server Setup

    • server keeps the mail until the client requests

    • read only the messages you want read by quickly downloading header information

  • Disconnected mode - Offline mode

    • read, modify, delete, reply… without connection to a network

Slide39 l.jpg

  • Red Hat - imag-4.5 RPM

  • if want to change some configurations

    • you need to recompile on the server

  • if want to qmail

    • need to change some configurations