e mail
Download
Skip this Video
Download Presentation
E-mail

Loading in 2 Seconds...

play fullscreen
1 / 39

E-mail - PowerPoint PPT Presentation


  • 225 Views
  • Uploaded 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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
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
E-mail
  • One of the first methods for communicating over the Internet
  • Protocol - SMTP (Simple Mail Transfer Protocol)
  • Mail Transport Agent(MAT) - sendmail
sendmail
Sendmail
  • In /etc/rd.init.d/sendmail.init …

Echo -n “Starting sendmail: “

daemon sendmail -bd -q1h

echo

touch /var/lock/subsys/sendmail

sendmail3
Sendmail
  • 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
Sendmail
  • TCP port 25

[[email protected] ~ ] # telnet localhost 25

Trying 127.0.0.1…

Connected to localhost.

Escape character is ‘^]’.

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

0400

sendmail configuration
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
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
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
/etc/aliases
  • 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
/etc/aliases

# 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
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
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
MIME
  • 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
MIME
  • Multipurpose Internet Mail Extension (1990s)
    • encode each data type
    • .mailcap file
      • what file types
      • what applications to run
forward file
.forward File
  • When mail comes in, .forward file is checked
  • .forward
    • email address
    • command
      • for example, vacation program
procmail
Procmail
  • 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
Procmail
  • .procmailrc file
    • three sectoins -- recipe

:0:

* ^From. *mark

from_me

:0

* ^Subject:. *Flame

/dev/null

mailing lists
Mailing Lists
  • Lager groups of people to communicate via email
  • preferable to using USENET
  • control who subscribe
  • control content
majordomo
Majordomo
  • 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
majordomo
  • Copy the mahordom1.94.tar.gz file to the home directory
  • uncompress/untar the file
  • modify majordomo.cf
    • additional file to handle aliases

OA/home/majordomo/majordomo.aliases

majordomo20
majordomo
  • For example

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

gastro-list”

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
majordomo
  • 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
Qmail : An alternative to Sendmail
  • Ease of use and security
  • need to a number of changes
qmail
Qmail
  • 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
Qmail
  • 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
Qmail
  • 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
Qmail
  • 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
Qmail
  • 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
Qmail
  • 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
Qmail
  • Look in .forward file instead of .forward file
  • not use /etc/aliases
  • root receive the mail by aliases
ezmlm
Ezmlm
  • 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
Ezmlm
  • 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
Ezmlm
  • 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
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
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
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
POP
  • Simple
  • Advantage
    • pick up emails at the office from home
  • Disadvantage
    • email on the server is often deleted once it gets sent to
slide37
POP
  • 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
IMAP
  • 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
IMAP
  • 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
ad