introduction to e-mail system and postfix

Post on 13-Nov-2014

636 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

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

TRANSCRIPT

Mail Server

1

self = {

2

傑洛Zero

3

4

eecesnmgMail Server

5

} # self

6

What is Mail Server?

7

郵8

件9

伺10

服11

器12

The Most IMPORTANT Server

13

Why?

14

Because they use it everyday!

15

Concepts

16

Traditional Mail Delivery

17

Electronic equivalent

18

MUAMTAMDA

Mail User AgentMail Transfer AgentMail Delivery Agent

19

Mail User Agent

20

Mail Transfer Agent

a.k.a 郵件伺服器

e.g. Sendmail, Postfix

21

Mail Delivery Agent

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

22

e-Mail delivery

Sender(MUA)

Servers (MTA, MDA)

Receiver(MUA)

23

Let’s play.

24

228-205:~ Zero$ telnet localhost 25

25

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

26

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

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<zero@ce.ncu.edu.tw>250 2.1.0 Okrcpt to:Target<target@my.target.edu.tw>250 2.1.5 Ok

說明寄信者跟收信人

28

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<zero@ce.ncu.edu.tw>250 2.1.0 Okrcpt to:Target<target@my.target.edu.tw>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

quit221 2.0.0 ByeConnection closed by foreign host.

30

概念搞定了

31

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

32

33

Why ?

34

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

login: Zero

password:

Welcome to FreeBSD!

[Zero@MailSec] /home/Zero$

35

[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

Service Control

• Startsudo postfix start

• Stopsudo postfix stop

• Restartsudo postfix restart

• Logtail -F /var/log/maillog

37

Then? Cross your finger.

38

After Postfix installed

• SASL Authentication

• Some configuration

• Anti-Spam

• Anti-Virus

• Webmail

• ....

39

top related