|/usr/local/bin/lens
:smtp_host | SMTP$B%[%9%HL>(B($B7HBS$X$NE>Aw$GMxMQ(B) |
:local_address | $B<+J,$N%a!<%k%"%I%l%9(B |
:mobile_address | $B7HBS%a!<%k%"%I%l%9(B |
:maildir | Maildir$B%G%#%l%/%H%j(B |
:non_important_mls | $B=EMW$G$J$$%a!<%j%s%0%j%9%HL>$N%j%9%H(B ($B7HBS$KE>Aw$7$J$$(B) |
:subject_patterns | Subject:$B$+$i$N%a!<%k?6$jJ,$1%Q%?%s(B |
:from_patterns | From:$B$+$i$N%a!<%k?6$jJ,$1%Q%?%s(B |
:spam_patterns | SPAM$B%a!<%k$N%Q%?%s(B |
# Configuration for Lens LensConfig = { :smtp_host => 'mail.example.com', :local_address => '[email protected]', :mobile_address => '[email protected]', :maildir => "#{ENV['HOME']}/Maildir", :non_important_mls => { 'test-ml' => 'test-ml', }, :subject_patterns => { 'xyz-ml' => 'xyz', }, :from_patterns => { # To: Cc: $B$K$bE,MQ$5$l$k(B 'yamada' => ['person/yamada', '01yamad'], }, :spam_patterns => { 'Content-type' => [ /gb2312/i, ], 'From' => [ /SmallCap/, ], 'Subject' => [ /ink.*jet.*toner/i, /health.*insurance/i, ], } }
Subject
$B$d(BFrom
$B$N(B
$B%Q%?%s%^%C%A%s%0$K$h$k(BSPAM$BH=Dj$7$+%5%]!<%H$7$F$$$^$;$s$,!"(B
Message$B%/%i%9$N(Bspam_contents?$B%a%=%C%I$r<+J,$GDj5A$9$l$P(B
$BG$0U$N(BSPAM$BH=Dj%W%m%0%i%`$rMxMQ$9$k$3$H$,$G$-$^$9!#(B
$B$9$Y$F$N?M$KM-8z$J(BSPAM$BH=Dj%W%m%0%i%`$,$"$l$P(B classify.rb$BFb$G$3$N%a%=%C%I$rDj5A$9$l$P$$$$$N$G$9$,!"(B $B$=$&$G$J$$>l9g$O<+A0$N(BSPAM$BH=Dj%W%m%0%i%`$rMxMQ$7$?J}$,NI$$$G$7$g$&!#(B $B;d$O0J2<$N$h$&$K(B~/.lensrc$BFb$G(Bspam_contents?$B$rDj5A$9$k$3$H$K$h$j(B bsfilter$B$H$$$&(B SPAM$BH=Dj%W%m%0%i%`$rMxMQ$7$F$$$^$9!#(B
class Message def spam_contents? system "/home/masui/bin/bsfilter -m rf --homedir /home/masui/SpamFilter/.bsfilter < #{path}" end endSPAM$BB`<#$NJ}K!$K$D$$$F$O!";d$,=q$$$?(B ASCII$B5-;v(B $B$J$I$,;29M$K$J$k$+$b$7$l$^$;$s!#(B
a/b
$B$H$$$&%U%)%k%@$O!"(B
Maildir/.a.b/
$B$H$$$&(B
$B%G%#%l%/%H%j$r;H$&$H2>Dj$7$F$$$^$9!#(B
$B$3$l$H0[$J$k%G%#%l%/%H%jL>$r;H$&(BMaildir$B$N>l9g$O(B
$B%W%m%0%i%`$N=$@5$,I,MW$G$9!#(B