1 北區機房 IP 維運處暨 IDC 維運組 鄭任峰 郵件系統維運 課程 : Sendmail 與 postfix 的設定與比較 北區機房 IP 維運處暨 IDC 維運組 鄭任峰.

Slides:



Advertisements
Similar presentations
Introduction to Networks
Advertisements

© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 10: Application Layer Introduction to Networks.
CPSC 441: FTP & SMTP1 Application Layer: FTP & Instructor: Carey Williamson Office: ICT Class.
Chapter 2: Application layer  2.1 Web and HTTP  2.2 FTP 2-1 Lecture 5 Application Layer.
Chapter 30 Electronic Mail Representation & Transfer
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Application Layer Functionality and Protocols Network Fundamentals – Chapter.
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 10: Application Layer Network Basics.
SMTP Simple Mail Transfer Protocol. Content I.What is SMTP? II.History of SMTP III.General Features IV.SMTP Commands V.SMTP Replies VI.A typical SMTP.
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.
Pro Exchange SPAM Filter An Exchange 2000 based spam filtering solution.
中華技術學院 Linux 課程 中華技術學院 Linux 課程 Chap Four : Mail 王俊城RHCE/RHCX.
Mail Server Fitri Setyorini. Content SMTP POP3 How mail server works IMAP.
-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.
Electronic Mail: SMTP, POP, and IMAP
1 SMTP Transport Configuration SMTP Configurations and Virtual Servers Customizing the SMTP Service.
1 Introduction AfNOG CHIX 2011 Blantyre, Malawi By Evelyn NAMARA.
1 Web Server Administration Chapter 8 Providing Services.
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
PRINCIPLES – DNS – ARCHITECTURES – SPAM
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.
Computer Networking From LANs to WANs: Hardware, Software, and Security Chapter 12 Electronic Mail.
IST346 – Servies Agenda  What is ?  Policies  The technical side of  Components  Protocols  architecture  Security.
Webmail. Agenda Why use webmail? Why use webmail? What is webmail What is webmail – basic » system MDA MDA MTA MTA MUA MUA »Protocol SMTP SMTP.
CSIE 1 Filtering mail Speaker: Chung yu Wu Adviser: Quincy Wu Date: 2005/12/07.
TCP/IP Protocol Suite 1 Chapter 20 Upon completion you will be able to: Electronic Mail: SMTP, POP, and IMAP Understand four configurations of architecture.
Module 6: Manage and Configure Messaging. Configuring Internet Mail Using Small Business Server (SBS) 2008 Console Configuring Protection Configuring.
Computer Networks26-1 Chapter 26. Remote Logging, Electronic Mail and File Transfer.
ISQS server attacks Presented by Deven Patel.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Application Layer Functionality and Protocols.
Traditional Internet Applications Dr. John P. Abraham Professor UTRGV.
Introduction to Internet Mail Abridged & Updated by Hervey Allen Noah Sematimba Based on Materials by Philip Hazel.
Mail Service Mail Service using Postfix Campus-Booster ID : **XXXXX
File Transfer Protocol (FTP)
1 Electronic Messaging Module - Electronic Messaging ♦ Overview Electronic messaging helps you exchange messages with other computer users anywhere in.
1 and Exim Introduction AfNOG 2012 Serekunda, The Gambia Chimwemwe Fredrick.
Proxy Server PROXY SERVER. What is a Web Proxy? Proxy Server A proxy is a host which relays web access requests from clients Used when clients do not.
2  Supervisor : MENG Sreymom  SNA 2012_Group4  Group Member  CHAN SaratYUN Sinot  PRING SithaPOV Sopheap  CHUT MattaTHAN Vibol  LON SichoeumBEN.
Module 7: Managing Message Transport. Overview Introduction to Message Transport Implementing Message Transport.
Data Communications and Networks Chapter 5 – Network Services DNS, DHCP, FTP and SMTP ICT-BVF8.1- Data Communications and Network Trainer: Dr. Abbes Sebihi.
1 COP 4343 Unix System Administration Unit 14: – send and receive mail – mail filtering – mail server – mailing lists.
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.
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.
1 Kyung Hee University Chapter 22 Simple Mail Transfer Protocol (SMTP)
Discussion of OCP/SMTP profile and some Use cases Presented by Abbie Barbir
26.1 Electronic Mail Sending/Receiving Mail Addresses User Agent MIME Mail Transfer Agent Mail Access Protocols.
Application Layer instructors at St. Clair College in Windsor, Ontario for their slides. Special thanks to instructors at St. Clair College in Windsor,
101 Derek Carter
Understanding POP3 / IMAP Created by : Ashish Shah, J. M. Patel College of Commerce 1.
concepts & protocols
Networking Applications
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
SUBMITTED BY: NAIMISHYA ATRI(7TH SEM) IT BRANCH
Traditional Internet Applications
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
Managing Routing Module 9 In this module we will look at the techniques required to ensure that messages are delivered to their intended destinations.
Chapter 7 Network Applications
 Zone in name space  DNS IN THE INTERNET  Generic domains :There are fourteen generic domains, each specifying an organization type.
Presentation transcript:

1 北區機房 IP 維運處暨 IDC 維運組 鄭任峰 郵件系統維運 課程 : Sendmail 與 postfix 的設定與比較 北區機房 IP 維運處暨 IDC 維運組 鄭任峰

2 Contents relative RFC Postfix compare with Sendmail Mail deliverly process Mail relay process DNS MX Resource Record MX Backup Postfix definitive: Postfix Major MDA purpose Postfix Big picture Postfix Queue Manager Postfix Content Filter Postfix Configuration Sendmail definitive: Sendmail Major MDA purpose Sendmail Big picture Sendmail Configuration Different between Postfix & Sendmail Command Different between Postfix & Sendmail Configuration

3 relative RFC RFC 2181 : Clarifications to the DNS Specification RFC 2821 : communicate with SMTP protocol for exchange mails RFC 1939 : retrieve mails with POP3 protocol RFC 2060 : retrieve mails with IMAP protocol

4 MUA/MTA/MDA MUA (Mail User Agent) Outlook, Thunderbird, Eudora, pine … MTA (Mail Transfer Agent) Postfix, Qmail, Sendmail, MS Exchange … MDA (Mail Delivery Agent) local, smtp, sendmail, virtual, lmtp …

5 Postfix compare with Sendmail Reliability: prevent resource exhaust Queue Management : flush/hold /re-queue Modules: dozen of MDAs Configuration Setting: separate parameter Concurrency Control: outgoing/incoming flow Transport: designate MDA Privilege: chroot Blocking: Client restriction/Syntex/ Content check/User defined

6 Mail deliverly process MUA Sender SMTP Mail Storage POP3 / IMAP MTA MDA POP/IMAPMUA Mail System Yellow  MDA Green  MUA Red  Storage pink  Server DNS Mail from: Mail to: Domain : aptg.net Recipient

7 Mail relay process MUA Sender SMTP MTA MDA MUA Mail System Yellow  MDA Green  MUA Pink  Server DNS Mail from: Mail to: Domain : aptg.net Recipient MTA

8 DNS MX Resource Record From: To: Step 1: MUA deliver mail(s) to aptg.net for relay Step 2: aptg.net request ‘pchome.com.tw’ for DNS MX RR by Resolver Step 3: PCHOME DNS server respond MX RR : mx.pchome.com.tw Step 4: Resolver request for A RR of ‘MX RR’ Step 5: PCHOME DNS server respond A RR: Step 6: Resolver provide pchome mail server IP to aptg.net Step 7: aptg.net deliver mail(s) to Port 25 with SMTP protocol SMTP (step 7) aptg.net mx.pchome.com.tw ( ) Client Outlook Resolver SMTP (step 1,6) DNS Query & Response ( Step 2,3,4,5) pchome.com.tw MX preference=10 mail exchanger=mx.pchome.com.tw mx.pchome.com.tw Address:

9 MX Backup SMTP Mail2.a.b.c Internet Mail1.a.b.c Deliver process Queue SMTP DNS Server MX RR SMTP Yellow  MDA Pink  Server mail.a.b.c MX preference = 10, mail exchanger = mail1.a.b.c mail.a.b.c MX preference = 20, mail exchanger = mail2.a.b.c

10 Postfix definitive Postfix Major MDA purpose Postfix Big picture Postfix Queue Manager Postfix Content Filter Postfix Configuration

11 Postfix Major MDA purpose master: initiate/restart MDA, concurrency limitation qmgr: decide transport, move/flush/delete/hold queue cleanup: assign QueueID, push to qmgr (incoming) smtpd: listenning incoming request pickup: get queue from maildrop rewrite: rewrite header smtp: handle outgoing request local: put mail into disk (local user maildir/mailbox format) lmtp: put mail into disk (local/virtual user other format) virtual: put mail into disk (virtual user maildir/mailbox format) pipe: pipe to program bounce: handle return mail

12 Postfix Big Picture (1/7)

13 Postfix Big Picture (2/7) From outside and relay to outside domain smtpdcleanup Trivial- rewrite incoming qmgr Yellow  MDA Blue  Queue Pool Gray  Queue Manager Pink  Server activesmtp DNS Server SMTP Server / MUA send mail(s) to outside domain

14 Postfix Big Picture (3/7) From outside and deliver to local domain smtpdcleanup Trivial- rewrite incoming qmgr active local/lmtp/ virtual Mail Storage Yellow  MDA Blue  Queue Pool Gray  Queue Manager Pink  Storage Aliases/forward table SMTP Server / MUA deliver mail(s) to inside domain

15 Postfix Big Picture (4/7) From local host and relay to outside domain Pickupcleanup Trivial- rewrite incoming qmgr postdrop From local host maildropactivesmtp DNS Server Yellow  MDA Blue  Queue Pool Gray  Queue Manager Pink  Server

16 Postfix Big Picture (5/7) From local host and deliver to local domain Pickupcleanup Trivial- rewrite incoming qmgr postdrop From local host maildropactive local/lmtp/ virtual Yellow  MDA Blue  Queue Pool Gray  Queue Manager Red  Storage Mail Storage Aliases/forward table

17 Postfix Big Picture (6/7) MDA & qmgr postdrop smtpd incoming qmgr active smtp deferred local virtual pipe pickupcleanup trivial- rewrite maildrop INPUT MDA OUTPUT MDA Internal MDA hold Yellow  MDA Blue  Queue Pool Gray  Queue Manager lmtp

18 Postfix Big Picture (7/7) Adding Content-Filter smtpd chkmsg smtp incoming cleanup deferred qmgr Yellow  MDA Blue  Queue Pool Gray  Queue Manager Deep Blue  Amavis activecleanup Amavis smtpd Port:10024 Port:10025 Port:25

19 Postfix Configuration Master.cf

20 Postfix Configuration - main.cf (1/3) Filter

21 Postfix Configuration - main.cf (2/3)

22 Postfix Configuration - main.cf (3/3)

23 Sendmail definitive Sendmail Major MDA purpose Sendmail Big picture Sendmail Configuration

24 Sendmail Major MDA purpose smtp: handle outgoing request local: put mail into disk (local user mailbox format) pipe to program uucp: unix to unix copy X.400: other address format

25 Sendmail Big Picture

26 Sendmail Configuration – sendmail.cf (1/3)

27 Sendmail Configuration – sendmail.cf (2/3)

28 Sendmail Configuration – sendmail.cf (3/3)

29 Different between Postfix & Sendmail Command start/stop/reload Daemon postfix start/stop/reload sendmail –bd –q1h/killall –TERM sendmail/killall –HUP sendmail flush/delete/requeue queue postfix flush/postsuper –d ALL/postsuper –r sendmail –q/ rm queue / none major configuration file master.cf / main.cf sendmail.cf / sendmail.mc / local-host-names Postfix Sendmail Postfix Sendmail Postfix Sendmail

30 Different between Postfix & Sendmail Configuration (1/3) major configuration file master.cf / main.cf sendmail.cf / sendmail.mc / local-host-names Local domain mydestination = aptg.net (main.cf) Cwaptg.net (sendmail.cf 或 local-host-names) Relay domain relay_host = apol.com.tw (main.cf) apol.com.tw (relay-domains) Postfix Sendmail Postfix Sendmail Postfix Sendmail

31 Different between Postfix & Sendmail Configuration (2/3) Smart relay transport_maps = hash:/etc/postfix/transport (main.cf) apol.com.twsmtp:[mx.apol.com.tw]:25 (/etc/postfix/transport) DSsmtp.aptg.net (sendmail.cf) Queue Bounce maximal_queue_lifetime = 1d (main.cf) O Timeout.queuereturn=1d (sendmail.cf) Queue retry queue_run_delay = 4h (main.cf) O Timeout.queuewarn=4h (sendmail.cf) Postfix Sendmail Postfix Sendmail Postfix Sendmail

32 Different between Postfix & Sendmail Configuration (3/3) Process Control (master.cf) service type private unpriv chroot wakeup maxproc command + args smtp inet n - n smtpd O MaxDaemonChildren=300 (sendmail.cf) Max Message Size message_size_limit = (main.cf) O MaxMessageSize= (sendmail.cf) Recipients limitation smtpd_recipient_limit = 100 (main.cf) O MaxRecipientsPerMessage=100 (sendmail.cf) Postfix Sendmail Postfix Sendmail Postfix Sendmail

33 Reference Postfix Official site Sendmail Official site V-Bird Postfix Building V-Bird Sendmail Building Sendmail Instruction Postfix Instruction

34 Q & A