Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSIE 1 Filtering mail Speaker: Chung yu Wu Adviser: Quincy Wu Date: 2005/12/07.

Similar presentations


Presentation on theme: "CSIE 1 Filtering mail Speaker: Chung yu Wu Adviser: Quincy Wu Date: 2005/12/07."— Presentation transcript:

1 CSIE 1 Filtering mail Speaker: Chung yu Wu Adviser: Quincy Wu Date: 2005/12/07

2 CSIE2 Outilne Mail protocol MUA 、 MTA 、 MDA Procmail Sendmail Predicament Regular Expression

3 CSIE3 POP3 POP3(Post Office Protocol, version 3) Is a client/server protocol in which e-mail is received and held for you by your Internet server. Periodically, you check your mail-box on the server and download any mail. port: 110

4 CSIE4 SMTP SMTP (Simple Mail Transfer Protocol) Is a protocol used in sending e-mail. port:25

5 CSIE5 IMAP IMAP (Internet Message Access Protocol) Is a standard protocol for accessing e-mail from your local server. Can view just the heading and the sender of the letter and then decide whether to download the mail

6 CSIE6 Send and received mail Client AClient B MTA relay mail SMTP send mail relay mail POP3 receive mail IMAP read or manage mail

7 CSIE7 MUA 、 MTA 、 MDA MUA: Mail User Agent  Outlook Express 、 Netscape Mail MTA: Mail Transfer Agent  Send mail  Received mail MDA: Mail Delivery Agent  Mail filtering

8 CSIE8 Send mail

9 CSIE9 Received mail

10 CSIE10 Relay Mail server sender Spam Company Open relay

11 CSIE11 Procmail MDA Filtering spam and virus Header: sender 、 receiver 、 address 、 title 。 Body: content Regular Expression

12 CSIE12 Use Procmail Forward #vi $HOME/.forward Insert “|exec /usr/local/bin/procmail” Procmailrc #vi ~/.procmailrc

13 CSIE13.Procmailrc Rules Notation Meaning :0Begin a recipe : Use a lock file *Begin a condition ^TO_ Look for a header that begins with To, Cc, Resent- To, or another destination specification

14 CSIE14.Procmailrc Rules(cont) :0[flags] :0: * ^Subject:*test /usr/mail/spam :0: * ^Body:*test /usr/mail/spam :0: * ^TOs94321544@ncnu.edu.tw /usr/mail/s94321544

15 CSIE15 Sendmail MTA Relay-domains Access Aliases Local-host-names

16 CSIE16 Relay-domains Allow configure domains relay mail #touch /etc/mail/relay-domains #vi /etc/mail/relay-domains 163.22.16. / *allow 163.22.16.xxx */ www.john.ipv6.club.tw

17 CSIE17 Access Process configure source mail Rules:  Ok: Unconditional accept  RELAY: Accept configure source mail  REJECT: Refusal configure source mail #vi /etc/mail/access 163.22.16.40 OK 163.22.16.33 RELAY John.ipv6.club.tw REJECT

18 CSIE18 Aliases Create a aliases to root #vi /etc/mail/aliases root: mutanwo staff: Mary,Bill,Jordan #newaliases

19 CSIE19 Local-host-names Received localhost send mail #vi /etc/mail/local-host-names ipv6.club.tw john.ipv6.club.tw xxx@ipv6.club.tw ok error xxx@john.ipv6.club.tw

20 CSIE20 Predicament Freebsd 5.4 Perl5.8.6+sendmail+procmail+spamassassin MTA: Sendmail MDA: Procmail+Spamassassin MUA: ELM Q1:Procmail path: ex:MAILDIR , PATH 。 Q2: Procmail Log: Q3:.forward file 。 All mail send to /var/mail/mailnull not root

21 CSIE21 Regular Expression Search string ^^string ex: ’^test’ => testxxxx $string$ ex: ‘test&’ => xxxxtest * string* ex: ‘b*’ => △,b,bb,bbb,bbbb…...any string ex: ‘a.c’ =>abc,acc,foc…. [ ]String set ex: ‘[br]ear’ =>bear,rear

22 CSIE22 References http://spamassassin.apache.org/ http://www.procmail.org/ http://www.sendmail.org/ http://www.regular-expressions.info/tutorial.html


Download ppt "CSIE 1 Filtering mail Speaker: Chung yu Wu Adviser: Quincy Wu Date: 2005/12/07."

Similar presentations


Ads by Google