1 / 15

Email

Email. WeeSan Lee <weesan@cs.ucr.edu> http://www.cs.ucr.edu/~weesan/cs183/. Roadmap. Introduction Mail System Architecture Email Headers Sendmail Debugging Aliases Forwarding Procmail Q&A. Introduction. The Internet. MUA Eudora. MTA (port 25). MTA (port 25). MUA Outlook.

york
Download Presentation

Email

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Email WeeSan Lee <weesan@cs.ucr.edu> http://www.cs.ucr.edu/~weesan/cs183/

  2. Roadmap • Introduction • Mail System Architecture • Email Headers • Sendmail • Debugging • Aliases • Forwarding • Procmail • Q&A

  3. Introduction The Internet MUA Eudora MTA (port 25) MTA (port 25) MUA Outlook LDA procmail MUA mail MUA mail MSA (port 587) Message store MUA pine MUA pine AA Imapd, pop3

  4. Introduction (cont) • A mail system consists of: • MUA – Mail User Agent • Lets users read and compose email, eg. Mail, Pine, Eudora, Outlook • MTA – Mail Transport Agent • Routes emails among machines, eg. Sendmail, Postfix • Speaks SMTP (Simple Mail Transport Protocol) • MSA – Mail Submission Agent • Accepting emails from MUA, eg. Sendmail • LDA – Local Delivery Agent • Places emails to a local message store, eg. Procmail • /var/spool/mail/username • AA – Access Agent • Connects MUA to message store, eg. POP3, IMAP Question: What are the differences between POP3 and IMAP?

  5. Mail System Architecture • Incoming SMTP server • For accepting incoming emails with spam filters • Outgoing SMTP server • For sending outgoing emails • IMAP or POP3 server • For retrieving emails • Message Store • /var/spool/mail/username • /home/username/mail/INBOX

  6. E-mail • Header • Attribute: value • Eg. • From: weesan@cs.ucr.edu • Bcc: bill.gates@microsoft.com • Header starts with X- will be ignored, eg. • X-Spam-Flag: YES • Body • 7-bit ASCII text • Question: How are binary data sent over emails?

  7. Sendmail • Both a MTA (port 25) and MSA (port 587) • Configuration file • /etc/mail/sendmail.cf • Mail queue • /var/spool/mqueue/

  8. Debugging • mail • $ cal | mail -s “test” weesan@cs.ucr.edu • sendmail -oi -t • $ cat | sendmail -oi –t • From: weesan@cs.ucr.edu • To: bill.gates@microsoft.com • Subject: Hi Bill • Linux is better  • -WeeSan • ^D

  9. Debugging (cont) • telnet • $ telnet mail.cs.ucr.edu 25 • … • 220 esmtp.cs.ucr.edu ESMTP Postfix • mail from: weesan@cs.ucr.edu • 250 Ok • rcpt to: bill.gates@microsoft.com • 250 Ok • data • 354 End data with <CR><LF>.<CR><LF> • Subject: Hi Bill • Linux is better :) • . • 250 Ok: queued as F1C832AFBE4 • quit • 221 Bye • Connection closed by foreign host.

  10. /etc/aliases or /etc/mail/aliases • Allows users to be referred by multiple names • Used by mailing list • $ cat /etc/aliases | grep weesan • root: weesan, weesan@email.com • To rehash aliases • $ newaliases

  11. ~/.forward • $ cat ~/.forward • \weesan • weesan@email.com

  12. ~/.procmailrc • # For spam • :0 • * (^Subject:.*\[SPAM\]|X-Spam-Flag: YES) • INBOX.spam • # Another type of spam  • :0 • * ^From:.*bill.gates@microsoft.com • /dev/null

  13. ~/.procmailrc • # SMS myself • :0 c • * ^From:.*myboss@ucr.edu • | (formail -c -XFrom: -XSubject: ; echo "To: $MY_CELL") | $SENDMAIL -oi -t

  14. ~/.procmailrc • # UCR Systems support emails • :0 • * ^Subject:.*(New Ticket|Ticket Assigned) • { • :0 c • INBOX.systems • :0 • | (formail -c -XFrom: -XSubject: ; echo "To: $MY_CELL") | $SENDMAIL -oi -t • }

  15. Reference • LAH • Ch 18: Electronic Mail • http://www.sendmail.org/ • http://www.procmail.org/ • http://www.imap.org/

More Related