CSIE 1 Filtering mail Speaker: Chung yu Wu Adviser: Quincy Wu Date: 2005/12/07
CSIE2 Outilne Mail protocol MUA 、 MTA 、 MDA Procmail Sendmail Predicament Regular Expression
CSIE3 POP3 POP3(Post Office Protocol, version 3) Is a client/server protocol in which 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
CSIE4 SMTP SMTP (Simple Mail Transfer Protocol) Is a protocol used in sending . port:25
CSIE5 IMAP IMAP (Internet Message Access Protocol) Is a standard protocol for accessing from your local server. Can view just the heading and the sender of the letter and then decide whether to download the mail
CSIE6 Send and received mail Client AClient B MTA relay mail SMTP send mail relay mail POP3 receive mail IMAP read or manage mail
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
CSIE8 Send mail
CSIE9 Received mail
CSIE10 Relay Mail server sender Spam Company Open relay
CSIE11 Procmail MDA Filtering spam and virus Header: sender 、 receiver 、 address 、 title 。 Body: content Regular Expression
CSIE12 Use Procmail Forward #vi $HOME/.forward Insert “|exec /usr/local/bin/procmail” Procmailrc #vi ~/.procmailrc
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
CSIE14.Procmailrc Rules(cont) :0[flags] :0: * ^Subject:*test /usr/mail/spam :0: * ^Body:*test /usr/mail/spam :0: * /usr/mail/s
CSIE15 Sendmail MTA Relay-domains Access Aliases Local-host-names
CSIE16 Relay-domains Allow configure domains relay mail #touch /etc/mail/relay-domains #vi /etc/mail/relay-domains / *allow xxx */
CSIE17 Access Process configure source mail Rules: Ok: Unconditional accept RELAY: Accept configure source mail REJECT: Refusal configure source mail #vi /etc/mail/access OK RELAY John.ipv6.club.tw REJECT
CSIE18 Aliases Create a aliases to root #vi /etc/mail/aliases root: mutanwo staff: Mary,Bill,Jordan #newaliases
CSIE19 Local-host-names Received localhost send mail #vi /etc/mail/local-host-names ipv6.club.tw john.ipv6.club.tw ok error
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
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
CSIE22 References