Download presentation
Presentation is loading. Please wait.
Published byMadlyn Black Modified over 9 years ago
1
Jump to first page Electronic Mail Peter D’Souza
2
Jump to first page Outline n Introduction n Mail Systems n Components of a Mail Message n Administrative Principles/Practices n Aliases n Sendmail n Security, privacy and other issues
3
Jump to first page Introduction n Essential to both businesses and individuals n New standard of social behavior u Cheaper/faster than postal services u Less formal than paper u Less personal than actual conversations
4
Jump to first page Mail Systems n Four distinct components u MUA - Mail user agent u MTA - Mail Transport agent u Delivery Agent u Access agent (optional) u Mail submission agent that speaks SMTP sometimes included
5
Jump to first page Mail Systems Message Store Eudora mail Pine UA SA TA DA imapd procmail mail.local sendmail (port 25) sendmail (port 587) UA=User Agent SA=Submission Agent TA=Transport Agent DA=Delivery Agent AA=Access Agent To local user agents Internet Host A - SenderHost B - Receiver
6
Jump to first page User Agents n Used to read and compose messages n Protect text embedded in contents n System wide and user-specific configuration supported
7
Jump to first page Transport Agents n Accept mail from user agent, understand recipient’s address, and get mail to correct host for delivery n Speak SMTP protocol n eg. sendmail, PMDF, PostFix, etc.
8
Jump to first page Delivery Agents n Accept mail from transport agent and actually deliver it to the appropriate local recipients n Speak SMTP protocol n eg. /bin/mail (local users), /bin/sh (mail going to a file), mail.local, smrsh
9
Jump to first page Other Agents n Access Agents u Connects user agent to message store u eg. IMAP or POP n Mail Submission Agents u Runs on a different port u Does all the prep work and error checking before the message can be sent out by TA n Sendmail acts as both MSA and TA
10
Jump to first page Anatomy of a Mail Message n Envelope From evi Wed Jan 19 19:01:11 2000 Received: (from evi@localhost) by xor.com (8.9.3/8.9.3) id TAA17820; Wed, 19 Jan 2000 19:01:11 –0700 (MST)evi@localhost Date: Wed, 19 Jan 2000 19:01:11 –0700 (MST) From: Evi Nemeth Evi.Nemeth@xor.comEvi.Nemeth@xor.com Message-Id: 200001200201.TAA17820@xor.com200001200201.TAA17820@xor.com To: trent@xor.comtrent@xor.com Subject: xor.mc CC: evi@xor.comevi@xor.com Status: R n Determines where the message will be delivered or, if the message cannot be delivered, to whom it should be returned.
11
Jump to first page Anatomy of a Mail Message (Contd) n Header 2: Return-Path: eric@knecht.sendmail.orgeric@knecht.sendmail.org 3: Received: from anchor.cs.colorado.EDU (root@anchor.cs.colorado.eduroot@anchor.cs.colorado.edu [128.138.242.1]) by columbine.cs.colorado.edu (8.9.3/8.9.2) with ESMTP id HAA21741 for ; Fri, 1 Oct 1999 07:04:25 –evi@rupertsberg.cs.colorado.edu 0700 (MST) 4: Received: from mroe.cs.colorado.EDU (mroe.cs.colorado.edu[128.138.243.151]) by anchor.cs.colorado.edu (8.9.3/8.9.2) with ESMTP id HAA26176 for ; Fri, 1 Oct 1999 07:04:24 – 0700 (MST)evi@anchor.cs.colorado.edu 5: Received: from knecht.sendmail.org(knecht.sendmail.org [209.31.233.160]) [128.138.242.1] by mroe.cs.colorado.edu (8.9.3/8.9.2) with ESMTP id HAA09899 for ; Fri, 1 Oct 1999 07:04:23 –evi@anchor.cs.cs.colorado.edu 700 (MST) 6. Received: from knecht.sendmail.org (localhost [127.0.0.1]) by knecht.sendmail.org (8.9.3/8.9.3) with ESMTP id GAA18984; Fri, 1 Oct 1999 07:04:25 – 800 (PST) u Collection of Property-value pairs formatted according to RFC822 n Body
12
Jump to first page Mail Philosophy n Servers for incoming and outgoing mail; or for really large sites, a hierarchy u Replication of incoming and outgoing servers u Typical UNIX hosts with minimal sendmail capabilities u Firewall n A mail home for each user at a physical site u Enforced through ‘aliases’ file, ‘maildrop’ field or LDAP database u Remote access provided via POP or IMAP n IMAP or POP to integrate PCs, Macs and remote clients u IMAP delivers messages one at a time u POP downloads all messages from server
13
Jump to first page Mail Aliases n Allow mail to be rerouted u Allow users to be referred by more than one name u Define mailing lists u Forward mail among machines n Defined in UA’s configuration file (sending user), /etc/mail/aliases (global) or in a.forward file(recipient) n Examples u Nemeth: evi u Evi: evi@mailhubevi@mailhub u Authors: evi,garth,scott,trent n From mail point of view, alias supersedes /etc/passwd n Loops detected by sendmail
14
Jump to first page Mailing lists n Giant alias n Usually specified in /etc/aliases but maintained in external file n :include: directive in aliases u sabook: :include:/usr/local/mail/usah.readers owner-mylist: mylist-request mylist-request:evi owner-owner: postmaster n Maintenance done by list manager u eg. Majordomo, Mailman, etc.
15
Jump to first page sendmail n Transport agent developed at Berkeley n Can adapt to whims of standard-makers due to flexibiiity of its configuration file n Generates error messages and returns messages to sender if they are undeliverable n Components required for installation u sendmail binary u configuration file (/etc/mail/sendmail.cf) u Mail queue directory (/var/spool/mqueue) u Links to sendmail (newaliases, mailq, hoststat) u Local delivery agents, smrsh and mail.local
16
Jump to first page sendmail (contd) n Latest version available at www.sendmail.orgwww.sendmail.org n Steps for installation u Initialize Database format and strategy for interfacing with administrative databases such as NIS or NetInfo u Compile FOR LDAP - sh./Build –c –f site.config.m4 u Should be explicitly started in rc files at boot time u Can be run on standalone clients as well by configuring it as null client (not run as daemon) u switch file used to exert fine grained control
17
Jump to first page sendmail – Config file n Raw config file designed for ease in parsing n Config file determines u Choice of delivery agents u Address rewriting rules u Mail header formats u Options u Security precautions u Spam resistance n At runtime, sendmail must be killed and restarted or sent a HUP signal if config file is changed n Commonly uses m4 macros
18
Jump to first page sendmail – config primitives n VERSIONID – embed version information (CVS) n OSTYPE – Vendor specific information for operating system details n DOMAIN – site-wide generic information (doing an include) n MAILER – must be included for every delivery agent
19
Jump to first page Spam control features n Rules that control relaying u Relaying used by spammers to disguise identity u Only hosts that are tagged with RELAY in access database can submit mail for relaying u Offers features for restricted relaying n Access database u Acts as mail specific firewall u Blocks mails from specific users and domains u Specify which domains a machine will relay for n Blacklists u Blocks local users or hosts n Header checking u Uses low level sendmail config file syntax to look for patterns in headers and reject these
20
Jump to first page Security in sendmail n Ships with built-in hooks for encryption n Later versions support both SMTP authentication and encryption with SSL (TLS–Transport Layer Security) n Includes DontBlameSendmail option to warn about potential risks in installation n Ownerships u DefaultUser : should not own any files u TrustedUser : can own maps and alias files u RunAsUser : run under after socket connections to port 25 are opened; switches identities to a different UID
21
Jump to first page Security (contd) n Permissions u Does not read files with lax permissions (world- writeable or that live in group or world-writeable directories) u Requires that entire path to any alias or forward file must be trusted i.e. no component can have group write permission u Does not read a.forward file with link count > 1 u SafeFileEnvironment option controls where files can be written and protect device files and directories
22
Jump to first page Security (contd.) n Authentication u Includes SMTP authentication to verify identity of sending machine u authwarnings option flags local attempts at forgery by adding Authentication-warning header to outgoing mail u identd daemon can be used to verify a sender’s real login name n Message Privacy u External encryption package needs to be used (PGP,TLS,etc) n Simple authentication and Security Layer u Generic authentication mechanism u Uses authorization identifier and authentication identifier to map to permissions on files, UNIX passwords, Kerberos tickets, etc. u Only authentication part used in sendmail
23
Jump to first page Other issues n Privacy u Lists privacy options in sendmail/conf.c u Controls what people can determine about your site from SMTP u States what you require of host on other end of SMTP connection u Defines whether users can see or run mail queue n DOS attacks u Flooding SMTP port with bogus connections u MaxDaemonChildren F limits number of sendmail processes F Prevents system from being overwhelmed with sendmail work u MaxMessageSize F Prevents mail queue directory from filling u ConnectionRateThrottle F Limits number of connections per second that are permitted u MaxRcptsPerMessage F Controls max number of recipients allowed on a single message
24
Jump to first page Thank you
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.