Lab#4 1 Week

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

計算機網路實驗

Lab#4
1 Week
Lab 4

Mail System
MUA
Brief introduction
MTA
Postfix
DNS MX record

2010/4/29 Computer Network Labs. Lee, Yuan-Hsiang 2


Public Addresses

IP
140.112.30.101 – 140.112.30.125
140.112.30.(100+GroupID)
Netmask
255.255.252.0
Gateway
140.112.30.254

2010/4/29 Computer Network Labs. Lee, Yuan-Hsiang 3


Domain Names

NS
cnl01.csie.org – cnl25.csie.org
If you are using cnlx.csie.org, please fix it.
MX
ms.cnl01.csie.org – ms.cnl25.csie.org
Don’t forget to setup A record
PTR
Your IP address has been point to ms record

2010/4/29 Computer Network Labs. Lee, Yuan-Hsiang 4


Scenario
“嗨老兄,我是 ta221,麻煩幫我寄信”
“好”
“寄信人地址是 ta221@csie.ntu.edu.tw”
“嗯”
“收件人地址則是 garywgl@csie.ntu.edu.tw”
“嗯”
“內容在這”
“講完說一聲”
“blah blah blah……..” “完”
“好,等等幫你送出去”
“謝啦, 掰”
“掰”

2010/4/29 Computer Network Labs. Lee, Yuan-Hsiang 5


In SMTP Protocol…
leeyh@leeyh:~$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 leeyh.csie.org ESMTP Postfix (Debian/GNU)
helo localhost
250 leeyh.csie.org
mail from: ta221@csie.ntu.edu.tw
250 2.1.0 Ok
rcpt to: garywgl@csie.ntu.edu.tw
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
blah blah blah
.
250 2.0.0 Ok: queued as 9F5011C5655
quit
221 2.0.0 Bye
Connection closed by foreign host.

2010/4/29 Computer Network Labs. Lee, Yuan-Hsiang 6


MUAs

2010/4/29 Computer Network Labs. Lee, Yuan-Hsiang 7


Protocols

SMTP
Simple Mail Transfer Protocol (RFC-821)
POP3
Post Office Protocol (RFC-1939)
IMAP
Internet Message Access Protocol (RFC-3501)

2010/4/29 Computer Network Labs. Lee, Yuan-Hsiang 8


When sending a mail…

MS

SMTP

2010/4/29 Computer Network Labs. Lee, Yuan-Hsiang 9


When retrieving mails…

老大,把我的
信給我,謝啦

MS

POP3

2010/4/29 Computer Network Labs. Lee, Yuan-Hsiang 10


Requirements
 Configure your postfix server as follows
Allow localhost and intranet sending email
Reject unknown sender
 mail from: foo@asodlfakwenrt
Allow internet sending email to the host
 The TA would send email to lab@cnlxx.csie.org
Email aliasing
 Alias lab@cnlxx.csie.org to your own accounts on
cnlxx.csie.org
 Do not forget to alias root, webmaster to yourself
Email forwarding
 Forward the email to your teammate’s mailbox

2010/4/29 Computer Network Labs. Lee, Yuan-Hsiang 11


Bonus

Configure RBL
Greylisting
Webmail
Open Webmail, Horde, …
DNS TXT record
SPF record
Authenticated SMTP
Ex: combining saslauthd
2010/4/29 Computer Network Labs. Lee, Yuan-Hsiang 12
Warning
If you get abused from NTU CC or other hosts
about spamming…

They may restrict your Internet access!


http://cert.ntu.edu.tw/Module/Index/ip.php

2010/4/29 Computer Network Labs. Lee, Yuan-Hsiang 13


Demo

Scheduled time slot


2010/5/5 14:00 – 2010/5/7 17:00

Other time slot


Please contact TAs to check available demo time
Title prefix: [CNL]

2010/4/29 Computer Network Labs. Lee, Yuan-Hsiang 14


Report

Answer the following question


What is called “open relay” and how do you
prevent it?
Explain email aliasing and forwarding
How do POP3 works? Could you use telnet to
simulate it?

2010/4/29 Computer Network Labs. Lee, Yuan-Hsiang 15


Other Announcements

Lab3 demo due extended


Next meeting
2010/5/5 12:30

2010/4/29 Computer Network Labs. Lee, Yuan-Hsiang 16


References
 Mail server basics
 http://www.study-area.org/linux/servers/linux_mail.htm
 http://linux.vbird.org/linux_server/0380mail.php
 http://linux.vbird.org/linux_server/0390postfix.php
 RBL
 http://www.akadia.com/services/postfix_uce.html
 AntiSpam (Avoid open relay problem)
 http://www.l-penguin.idv.tw/article/postfix_spam.htm
 OpenWebmail
 http://openwebmail.org/
 Greylist
 http://en.wikipedia.org/wiki/Greylisting
 SPF Text
 http://en.wikipedia.org/wiki/Sender_Policy_Framework
 http://old.openspf.org/dns.html

2010/4/29 Computer Network Labs. Lee, Yuan-Hsiang 17

You might also like