Download
e mail n.
Skip this Video
Loading SlideShow in 5 Seconds..
E-mail PowerPoint Presentation

E-mail

250 Vues Download Presentation
Télécharger la présentation

E-mail

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. E-mail • One of the first methods for communicating over the Internet • Protocol - SMTP (Simple Mail Transfer Protocol) • Mail Transport Agent(MAT) - sendmail

  2. Sendmail • In /etc/rd.init.d/sendmail.init … Echo -n “Starting sendmail: “ daemon sendmail -bd -q1h echo touch /var/lock/subsys/sendmail

  3. 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

  4. Sendmail • TCP port 25 [markk@wayga ~ ] # 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

  5. 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

  6. 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

  7. 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>

  8. /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

  9. /etc/aliases # Well-known aliases. manager : root operator: root # Person who should get root’s mail root: mark mfk: mark bren: brenda bdk: brenda

  10. 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

  11. MUA(Mail User Agent) • Program enable us to read/write emails • low-feature (mail) • high-feature • full-screen (elm,pine,mutt) • the graphical (Netscape)

  12. 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)

  13. MIME • Multipurpose Internet Mail Extension (1990s) • encode each data type • .mailcap file • what file types • what applications to run

  14. .forward File • When mail comes in, .forward file is checked • .forward • email address • command • for example, vacation program

  15. 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

  16. Procmail • .procmailrc file • three sectoins -- recipe :0: * ^From. *mark from_me :0 * ^Subject:. *Flame /dev/null

  17. Mailing Lists • Lager groups of people to communicate via email • preferable to using USENET • control who subscribe • control content

  18. 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

  19. 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

  20. 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

  21. majordomo • initialize the lists • edit ~majordom/lists/gastro.config • all the configuration settings for the particular list Echo “conf gastro gastro.admin” | mail majordomo

  22. Qmail : An alternative to Sendmail • Ease of use and security • need to a number of changes

  23. 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

  24. 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

  25. 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

  26. 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

  27. 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

  28. 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

  29. Qmail • Look in .forward file instead of .forward file • not use /etc/aliases • ~alias/.qmail-markk contains “enry@wayga.net” • root receive the mail by aliases

  30. 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

  31. 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

  32. 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

  33. 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

  34. 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.

  35. 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

  36. POP • Simple • Advantage • pick up emails at the office from home • Disadvantage • email on the server is often deleted once it gets sent to

  37. 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

  38. 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

  39. 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