SpamAssassin Chinese rules 

I trimmed some chinese rules from geewhiz to run fast with spamassassin

http://bl0g.blogdns.com/rules/99_geewhizg_mcli_zh.cf
http://bl0g.blogdns.com/rules/50_scores ... mcli_zh.cf
[ add comment ] permalink ( 3 / 103 )
Lower end network attached storage - Linksys NSLU2 

I got my brand new Linksys NSLU2, yay! I spent half day to read the documentation on http://www.nslu2-linux.org/ and successfully flashed the firmware and boot the box up from external USB Lacie drive
There is some trouble when I try to usling to the external usb drive. everytime when I boot the box up without usb harddrive, followed the unslung readme to enable the telnet from web, then attached the usb drive, the box won't recognize the usb drive. After reading the http://www.nslu2-linux.org/wiki/HowTo/T ... gCondition here is the final steps i got it worked:

1, Connect the usb lacie disk to powerbook, and format it as HFS Journal filesystem from disk utility
2, attach the usb drive with the NSLU2 box, power it up
3, format the usb drive with ext3 from web
4, reboot the box
5, enble the telnet from web,
6, telnet to the box using account root and password uNSLUng
7, /sbin/usling -nopw disk2
8, reboot the box, that is it

There is still a mistery that from step 4 and 6. From the usling readme. it says I should always dettach the usb drive before enable the telnet and telnet to NSLU2, otherwise, the password uNSLUng won't work because if the usb drive was attached, the password won't be uNSLUng but the factory password which nobody knows. It seems not true in my case. I am not sure If I can duplicate the same step, and it will work though, as it is painful to do so.
[ add comment ] permalink ( 3 / 112 )
Perl Obfuscated code for fun 

Today, I played the original came code which print camel picture. http://perlmonks.org/?node=camel+code

I just quckly turned the program shape into a chinese character zhong, and obviously it will print out chinese character zhong :)

Check the code http://bl0g.blogdns.com/code2006/zhong.pl
[ add comment ] permalink ( 3 / 95 )
Perl buffer suffering 

Wonder what $| =1 in Perl means? here is a great link to learn Perl buffering

http://perl.plover.com/FAQs/Buffering.html
[ add comment ] permalink ( 3 / 105 )
Debugging SpamAssassin with timestamp 

I just learned from amavisd-new developer Mark I could run command below to check the timestamp of each SA running debugging lines:

su clamav -c 'spamassassin -t -D <test.msg' 2>&1 | perl -MPOSIX -MTime::HiRes -n -e '
BEGIN {$|=1; $dp=0; $t0=Time::HiRes::time};
$t=Time::HiRes::time; $dt=$t-$t0; printf("%s%06.3f %4.3f %4.3f %s",
POSIX::strftime("%H:%M:",localtime($t)), $t-int($t/60)*60,
$dt, $dt-$dp, $_); $dp=$dt' $*


[ add comment ] permalink ( 3.2 / 85 )

Back Next