Download - Introduction to e-mail system and postfix
![Page 1: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/1.jpg)
Mail Server
1
![Page 2: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/2.jpg)
self = {
2
![Page 3: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/3.jpg)
傑洛Zero
3
![Page 4: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/4.jpg)
4
![Page 5: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/5.jpg)
eecesnmgMail Server
5
![Page 6: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/6.jpg)
} # self
6
![Page 7: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/7.jpg)
What is Mail Server?
7
![Page 8: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/8.jpg)
郵8
![Page 9: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/9.jpg)
件9
![Page 10: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/10.jpg)
伺10
![Page 11: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/11.jpg)
服11
![Page 12: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/12.jpg)
器12
![Page 13: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/13.jpg)
The Most IMPORTANT Server
13
![Page 14: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/14.jpg)
Why?
14
![Page 15: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/15.jpg)
Because they use it everyday!
15
![Page 16: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/16.jpg)
Concepts
16
![Page 17: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/17.jpg)
Traditional Mail Delivery
17
![Page 18: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/18.jpg)
Electronic equivalent
18
![Page 19: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/19.jpg)
MUAMTAMDA
Mail User AgentMail Transfer AgentMail Delivery Agent
19
![Page 20: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/20.jpg)
Mail User Agent
20
![Page 21: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/21.jpg)
Mail Transfer Agent
a.k.a 郵件伺服器
e.g. Sendmail, Postfix
21
![Page 22: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/22.jpg)
Mail Delivery Agent
幫忙把郵件放到個人的信箱去
22
![Page 23: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/23.jpg)
e-Mail delivery
Sender(MUA)
Servers (MTA, MDA)
Receiver(MUA)
23
![Page 24: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/24.jpg)
Let’s play.
24
![Page 25: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/25.jpg)
228-205:~ Zero$ telnet localhost 25
25
![Page 26: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/26.jpg)
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](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/27.jpg)
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](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/28.jpg)
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](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/29.jpg)
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](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/30.jpg)
quit221 2.0.0 ByeConnection closed by foreign host.
30
![Page 31: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/31.jpg)
概念搞定了
31
![Page 32: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/32.jpg)
那來教你怎麼裝(本範例僅供參考?)
32
![Page 33: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/33.jpg)
33
![Page 34: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/34.jpg)
Why ?
34
![Page 35: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/35.jpg)
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](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/36.jpg)
[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](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/37.jpg)
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](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/38.jpg)
Then? Cross your finger.
38
![Page 39: Introduction to e-mail system and postfix](https://reader034.vdocuments.pub/reader034/viewer/2022051312/54648c74b4af9fdf3f8b4631/html5/thumbnails/39.jpg)
After Postfix installed
• SASL Authentication
• Some configuration
• Anti-Spam
• Anti-Virus
• Webmail
• ....
39