1 Email and Exim Introduction AfNOG 2012 Serekunda, The Gambia Chimwemwe Fredrick.

Slides:



Advertisements
Similar presentations
Basic Communication on the Internet:
Advertisements

CPSC 441: FTP & SMTP1 Application Layer: FTP & Instructor: Carey Williamson Office: ICT Class.
1 Chapter Overview Introduction to Windows XP Professional Printing Setting Up Network Printers Connecting to Network Printers Configuring Network Printers.
2440: 141 Web Site Administration Services Instructor: Enoch E. Damson.
Introduction 1 Lecture 7 Application Layer (FTP, ) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
-I CS-3505 Wb_ -I.ppt. 4 The most useful feature of the internet 4 Lots of different programs, but most of them can talk to each.
Introduction to Internet Mail Noah Sematimba Based on Materials by Philip Hazel.
Introduction 1-1 Chapter 2 FTP & Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 IC322 Fall.
1 Linux Networking and Security Chapter 3. 2 Configuring Client Services Configure DNS name resolution Configure dial-up network access using PPP Understand.
Electronic Mail (SMTP, POP, IMAP, MIME)
Implementing POP3 and IMAP4 Using Dovecot
1 Introduction AfNOG CHIX 2011 Blantyre, Malawi By Evelyn NAMARA.
SMTP, POP3, IMAP.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
Mail Server Three major components MTA MUA MDA Mail Transfer Agent
Mail Services.
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 2: Application.
Application Layer Protocols Simple Mail Transfer Protocol.
The Linux Operating System Lecture 7: Tonga Institute of Higher Education.
1 Computer Communication & Networks Lecture 27 Application Layer: Electronic mail and FTP Waleed.
SMTP PROTOCOL CONFIGURATION AND MANAGEMENT Chapter 8.
Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer.
Computer Networking From LANs to WANs: Hardware, Software, and Security Chapter 12 Electronic Mail.
1 北區機房 IP 維運處暨 IDC 維運組 鄭任峰 郵件系統維運 課程 : Sendmail 與 postfix 的設定與比較 北區機房 IP 維運處暨 IDC 維運組 鄭任峰.
IST346 – Servies Agenda  What is ?  Policies  The technical side of  Components  Protocols  architecture  Security.
CSIE 1 Filtering mail Speaker: Chung yu Wu Adviser: Quincy Wu Date: 2005/12/07.
26.1 Chapter 26 Remote Logging, Electronic Mail, and File Transfer Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or.
SMTP/POSTFIX.
Recovery-Oriented Computing User Study Training Materials October 2003.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Application Layer Functionality and Protocols.
Introduction to Internet Mail Abridged & Updated by Hervey Allen Noah Sematimba Based on Materials by Philip Hazel.
File Transfer Protocol (FTP)
Mailserver. Why Postfix ? Sendmail’s legacy Built from ground up Central queue-ing More future-proof Exim4 default of debian, but...
1 Electronic Messaging Module - Electronic Messaging ♦ Overview Electronic messaging helps you exchange messages with other computer users anywhere in.
1 SMTP - Simple Mail Transfer Protocol –RFC 821 POP - Post Office Protocol –RFC 1939 Also: –RFC 822 Standard for the Format of ARPA Internet Text.
2  Supervisor : MENG Sreymom  SNA 2012_Group4  Group Member  CHAN SaratYUN Sinot  PRING SithaPOV Sopheap  CHUT MattaTHAN Vibol  LON SichoeumBEN.
Data Communications and Networks Chapter 5 – Network Services DNS, DHCP, FTP and SMTP ICT-BVF8.1- Data Communications and Network Trainer: Dr. Abbes Sebihi.
CS 3830 Day 9 Introduction 1-1. Announcements r Quiz #2 this Friday r Demo prog1 and prog2 together starting this Wednesday 2: Application Layer 2.
LinxChix And Exim. Mail agents MUA = Mail User Agent Interacts directly with the end user  Pine, MH, Elm, mutt, mail, Eudora, Marcel, Mailstrom,
SMTP Tapu Ahmed Jeremy Nunn. Basics Responsible for electronic mail delivery. Responsible for electronic mail delivery. Simple ASCII protocol that runs.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Application Layer Functionality and Protocols.
A Quick Look At How Works Understanding the basics of how works can make life a lot easier for any user. Especially those who are interested.
SMTP - Simple Mail Transfer Protocol RFC 821
CITA 310 Section 6 Providing Services (Textbook Chapter 8)
Slides based on Carey Williamson’s: FTP & SMTP1 File Transfer Protocol (FTP) r FTP client contacts FTP server at port 21, specifying TCP as transport protocol.
Linux Operations and Administration Chapter Twelve Configuring a Mail Server.
COMP 431 Internet Services & Protocols
1 Kyung Hee University Chapter 22 Simple Mail Transfer Protocol (SMTP)
Domain Name System INTRODUCTION to Eng. Yasser Al-eimad
Basics of the Domain Name System (DNS) By : AMMY- DRISS Mohamed Amine KADDARI Zakaria MAHMOUDI Soufiane Oujda Med I University National College of Applied.
Spoofing The False Digital Identity. What is Spoofing?  Spoofing is the action of making something look like something that it is not in order to gain.
26.1 Electronic Mail Sending/Receiving Mail Addresses User Agent MIME Mail Transfer Agent Mail Access Protocols.
By: Derek Ton & Alex Pappas.  Most frequently used internet service that you will manage as network administrator.  You need to understand how they.
Application Layer instructors at St. Clair College in Windsor, Ontario for their slides. Special thanks to instructors at St. Clair College in Windsor,
Spring 2006 CPE : Application Layer_ 1 Special Topics in Computer Engineering Application layer: Some of these Slides are Based on Slides.
101 Derek Carter
concepts & protocols
SMTP - Simple Mail Transfer Protocol POP - Post Office Protocol
Networking Applications
Remote Logging, Electronic Mail, and File Transfer
SUBMITTED BY: NAIMISHYA ATRI(7TH SEM) IT BRANCH
Working at a Small-to-Medium Business or ISP – Chapter 7
Working at a Small-to-Medium Business or ISP – Chapter 7
Working at a Small-to-Medium Business or ISP – Chapter 7
has many aspects that work together to give people almost instant communication from any computer on the internet to any other computer There.
Unit – 4 Chap - 2 Mail Delivery System
Chapter 7 Network Applications
 Zone in name space  DNS IN THE INTERNET  Generic domains :There are fourteen generic domains, each specifying an organization type.
Data Communications and Networks
Presentation transcript:

1 and Exim Introduction AfNOG 2012 Serekunda, The Gambia Chimwemwe Fredrick

2 Scope How Appears to Work How Really Works Mail User Agent (MUA)‏ Mail Delivery Agent (MDA)/ Mail Transfer Agent (MTA)‏ Queue MTA to MTA Transfer Delivery RFCs Introduction to Exim Installing Exim Starting Exim The Exim Game

3 How Appears to Work

4 How Really Works

5 Mail User Agent (MUA)‏ Application the originating sender uses to compose and read Pine, MH, Elm, mutt, mail, Eudora, Marcel, Mailstrom, Thunderbird, Pegasus, Express, Netscape, Outlook,... You can have multiple MUAs on one system - end user choice

6 Mail Delivery Agent (MDA)/ Mail Transfer Agent (MTA)‏ MDA/MTA accepts the , then routes it to local mailboxes or forwards it if it isn't locally addressed An can encounter a network cloud within a large company or ISP, or the largest network cloud in existence: the Internet.

7 Queue The enters an queue with other outgoing messages. If there is a high volume of mail in the queue—either because there are many messages or the messages are unusually large, or both— the message will be delayed in the queue until the MTA processes the messages ahead of it.

8 MTA to MTA Transfer clears the queue, enters the Internet network cloud, where it is routed along a host-to-host chain of servers The sending MTA handles all aspects of mail delivery until the message has been either accepted or rejected by the receiving MTA Each MTA needs to "stop and ask directions" from the DNS in order to identify the next MTA in the delivery chain Exact route depends partly on server availability and mostly on which MTA can be found to accept for the domain specified in the address ABUSE: Some spammers specify any part of the path, deliberately routing their message through a series of relay servers in an attempt to obscure the true origin of the message.

9 DNS resolution and transfer process To find the recipient's IP address and mailbox, the MTA must drill down through the DNS system, which consists of a set of servers distributed across the Internet beginning with the root nameservers  root servers refer requests for a given domain to the root nameservers that handle requests for that tld MTA can bypass this step because it already knows which domain nameservers handle requests for these.tlds e.g. telecom.ma  asks the appropriate DNS server which Mail Exchange (MX) servers have knowledge of the subdomain or local host in the address  DNS server responds with an MX record: a prioritized list of MX servers for this domain  To the DNS server, the server that accepts messages is an MX server. When it is transferring messages, it is called an MTA.  MTA contacts the MX servers on the MX record in order of priority until it finds the designated host for that address domain  sending MTA asks if the host accepts messages for the recipient's username at that domain (i.e., and transfers the message

10 Delivery If the message makes it past the filters:  The MTA calls a local MDA to deliver the mail to the correct mailbox, where it will sit until it is retrieved by the recipient's MUA

11 Troubleshooting Issues transient failures  If a transient error occurs, the MTA will hang onto the message, periodically retrying the delivery until it either succeeds or fails, or until the MTA decides that the transient issue is really a permanent condition. permanent failures  If the MTA cannot deliver the message (it has received a fatal error message or failed to complete the transfer after repeated attempts), it bounces the message back to the sender. If the sender is a mailing list, the bounce may be handled by automated bounce-handling software.

12 RFCs Documents that define standards are called "Request For Comments (RFCs)", and are available on the Internet through the Internet Engineering Task Force (IETF) website  There are many RFCs and they form a somewhat complex, interlocking set of standards, great information for anyone interested in gaining a deeper understanding of . Most pertinent RFCs:  RFC 822, 2822: Standard for the Format of ARPA Internet Text Messages  RFC 2821: Simple Mail Transfer Protocol  RFC 1122, 1123, 1651, 1653, 1830, MIME RFCs...

What is Exim? Listens on port 25 (smtp) Accepts mail Queues mail Delivers it somewhere Using SMTP, LMTP, LDA, mbox or maildir No POP, IMAP, calendars, to-do lists, Crackberry!

Who uses Exim? University of Cambridge, UK Energis Squared (formerly Planet Online), UK Shore.Net (large regional ISP in the Northeastern US) Esat Net (longest serving ISP in Ireland) Default on new Debian installations Aptivate

Why use Exim? Flexible (lots of features) Reasonably secure Reasonably scalable Good debugging options Sane configuration syntax

Why not to use Exim? Not every problem is a nail Simplicity? Use postfix or qmail Top security? Use qmail Faster delivery? Use postfix or sendmail Insane configuration file? Use sendmail Note: Exim is not designed for spooling large amounts of mail and not very good at it

Conventions File names and technical terms are in italics Commands to type are shown in monospaced bold italic : cat /etc/monospaced/bold/italic/purple Long command lines are wrapped, but with a single bullet point at the start: cat /usr/local/etc/foo/bar | less | more | grep | sed | awk > /usr/local/tmp/foo/bar Text that is output by a program, or should already be in a file, is shown in plain monospaced type: sshd_enable="YES"

Root and sudo We will use “sudo” wherever root access is required Please work through this tutorial as a normal user, not as root If you use root, some error messages from Exim will be different and this may confuse you

Installing Exim (1) Install some dependencies as packages, not ports: sudo -E pkg_add -r libspf2 cyrus-sasl-saslauthd perl pcre mysql51-client Compile Exim from the ports tree: cd /usr/ports/mail/exim sudo make config Enable the following options: AUTH_RADIUS CONTENT_SCAN MYSQL SASLAUTHD SPF

Installing Exim (2) Now compile Exim: sudo make SUBDIR=old WITH_RADIUS_TYPE=RADLIB EXTRALIBS_EXIM=/usr/lib/libradius.so install clean All on one line! Should take a while compiling, and end with: ===> Cleaning for exim-4.77_1

Checking Exim Installation /usr/local/sbin/exim –bV Exim version Support for: crypteq iconv() IPv6 use_setclassresources PAM Perl Expand_dlfunc OpenSSL Content_Scanning Old_Demime Experimental_SPF Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb dsearch mysql nis nis0 passwd Authenticators: cram_md5 dovecot plaintext spa If you don't have these options: cd /usr/ports/mail/exim make deinstall clean Go back to Installing Exim (1)

Replacing Sendmail with Exim Stop Sendmail: sudo /etc/rc.d/sendmail stop Edit /etc/rc.conf and add these lines: sendmail_enable="NONE" sendmail_submit_enable="NO" exim_enable="YES" Edit /etc/mail/mailer.conf and change these lines: sendmail/usr/local/sbin/exim send-mail/usr/local/sbin/exim mailq/usr/local/sbin/exim -bp newaliases/bin/true

Starting Exim Try the following commands: sudo /usr/local/etc/rc.d/exim start Starting exim. sudo /usr/local/etc/rc.d/exim status exim is running as pid XXX sudo /usr/local/etc/rc.d/exim restart Stopping exim. Starting exim. Create /etc/periodic.conf.local and add these lines: daily_status_include_submit_mailq="NO" daily_clean_hoststat_enable="NO"

The Exim Game

25 Q&A