39
Mail Server 1

Introduction to e-mail system and postfix

  • Upload
    itszero

  • View
    636

  • Download
    0

Embed Size (px)

DESCRIPTION

Introducing E-mail system concepts and postfix installation to NCU eecesnmg's new member.

Citation preview

Page 1: Introduction to e-mail system and postfix

Mail Server

1

Page 2: Introduction to e-mail system and postfix

self = {

2

Page 3: Introduction to e-mail system and postfix

傑洛Zero

3

Page 4: Introduction to e-mail system and postfix

4

Page 5: Introduction to e-mail system and postfix

eecesnmgMail Server

5

Page 6: Introduction to e-mail system and postfix

} # self

6

Page 7: Introduction to e-mail system and postfix

What is Mail Server?

7

Page 8: Introduction to e-mail system and postfix

郵8

Page 9: Introduction to e-mail system and postfix

件9

Page 10: Introduction to e-mail system and postfix

伺10

Page 11: Introduction to e-mail system and postfix

服11

Page 12: Introduction to e-mail system and postfix

器12

Page 13: Introduction to e-mail system and postfix

The Most IMPORTANT Server

13

Page 14: Introduction to e-mail system and postfix

Why?

14

Page 15: Introduction to e-mail system and postfix

Because they use it everyday!

15

Page 16: Introduction to e-mail system and postfix

Concepts

16

Page 17: Introduction to e-mail system and postfix

Traditional Mail Delivery

17

Page 18: Introduction to e-mail system and postfix

Electronic equivalent

18

Page 19: Introduction to e-mail system and postfix

MUAMTAMDA

Mail User AgentMail Transfer AgentMail Delivery Agent

19

Page 20: Introduction to e-mail system and postfix

Mail User Agent

20

Page 21: Introduction to e-mail system and postfix

Mail Transfer Agent

a.k.a 郵件伺服器

e.g. Sendmail, Postfix

21

Page 22: Introduction to e-mail system and postfix

Mail Delivery Agent

幫忙把郵件放到個人的信箱去

22

Page 23: Introduction to e-mail system and postfix

e-Mail delivery

Sender(MUA)

Servers (MTA, MDA)

Receiver(MUA)

23

Page 24: Introduction to e-mail system and postfix

Let’s play.

24

Page 25: Introduction to e-mail system and postfix

228-205:~ Zero$ telnet localhost 25

25

Page 26: Introduction to e-mail system and postfix

228-205:~ Zero$ telnet localhost 25Connected to localhost.Escape character is '^]'.220 228-205.dorm.ncu.edu.tw ESMTP Postfix

26

Page 27: Introduction to e-mail system and postfix

228-205:~ Zero$ telnet localhost 25Connected to localhost.Escape character is '^]'.220 228-205.dorm.ncu.edu.tw ESMTP Postfixhelo ce.ncu.edu.tw250 228-205.dorm.ncu.edu.tw

跟主機打招呼

27

Page 28: Introduction to e-mail system and postfix

228-205:~ Zero$ telnet localhost 25Connected to localhost.Escape character is '^]'.220 228-205.dorm.ncu.edu.tw ESMTP Postfixhelo ce.ncu.edu.tw250 228-205.dorm.ncu.edu.twmail from:Zero<[email protected]>250 2.1.0 Okrcpt to:Target<[email protected]>250 2.1.5 Ok

說明寄信者跟收信人

28

Page 29: Introduction to e-mail system and postfix

228-205:~ Zero$ telnet localhost 25Connected to localhost.Escape character is '^]'.220 228-205.dorm.ncu.edu.tw ESMTP Postfixhelo ce.ncu.edu.tw250 228-205.dorm.ncu.edu.twmail from:Zero<[email protected]>250 2.1.0 Okrcpt to:Target<[email protected]>250 2.1.5 Okdata354 End data with <CR><LF>.<CR><LF>This is a test mail..250 2.0.0 Ok: queued as 2F516B326C

再來就是要寫信啦!

29

Page 30: Introduction to e-mail system and postfix

quit221 2.0.0 ByeConnection closed by foreign host.

30

Page 31: Introduction to e-mail system and postfix

概念搞定了

31

Page 32: Introduction to e-mail system and postfix

那來教你怎麼裝(本範例僅供參考?)

32

Page 33: Introduction to e-mail system and postfix

33

Page 34: Introduction to e-mail system and postfix

Why ?

34

Page 35: Introduction to e-mail system and postfix

FreeBSD/i386 (MailSec.ce.ncu.edu.tw) (ttyv0)

login: Zero

password:

Welcome to FreeBSD!

[Zero@MailSec] /home/Zero$

35

Page 36: Introduction to e-mail system and postfix

[Zero@MailSec] /home/Zero$ sudo su[root@MailSec] /home/Zero$ cd /usr/ports/mail/postfix[root@MailSec] /usr/ports/mail/postfix $ make install..........

最後加入這些東西到/etc/rc.conf

sendmail_enable="NO"sendmail_submit_enable="NO"sendmail_outbound_enable="NO"sendmail_msp_queue_enable="NO"postfix_enable="YES"

36

Page 37: Introduction to e-mail system and postfix

Service Control

• Startsudo postfix start

• Stopsudo postfix stop

• Restartsudo postfix restart

• Logtail -F /var/log/maillog

37

Page 38: Introduction to e-mail system and postfix

Then? Cross your finger.

38

Page 39: Introduction to e-mail system and postfix

After Postfix installed

• SASL Authentication

• Some configuration

• Anti-Spam

• Anti-Virus

• Webmail

• ....

39