2007年10月16日

新注册了个独立域名,使用独立的blog了。

http://618119.com

rss订阅地址: http://feed.feedsky.com/lizongbo

从最早的 http://blog.csdn.net/lizongbo,

到 http://blog.donews.com/lizongbo

再到http://www.blogjava.net/lizongbo

现在终于拥有自己的域名和独立的blog了。

2005年08月16日

在google中搜索 delphi xmlprc,找到的结果几乎没什么价值,

网页  约有13,300项符合delphi xmlrpc的查询结果,以下是第1-10项。 (搜索用时 0.06 秒) 

经过多次搜索查找,终于找到了用delphi写的开源的  xmlrpc client 的库.

原来需要用 delphi xml-rpc作关键字才找得到,特意在此作一下下记录:

http://www.google.com/search?hl=zh-CN&inlang=zh-CN&newwindow=1&q=delphi+xml-rpc&lr=

http://sourceforge.net/projects/delphixml-rpc/

http://prdownloads.sourceforge.net/delphixml-rpc/dxmlrpc-2.0.0.zip?download

xmlrpctypes , xmlrpccommon 也是可选的关键字,呵呵

2005年06月08日

windows操作系统可以通过修改注册表来在user agent里添加自己的扩展标志:
下面是例子:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\User Agent]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\User Agent\Post Platform]
"MyIE2"="IEAK"
"lizongbo"="IEAK"
"Googlebot"="IEAK"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\User Agent\UA Tokens]
@=""
"MSN 2.0"=""
"MSN 2.5"=""

Flashget也可以设置下载时的user-agent.

操作如下 : 主菜单->工具->选项->协议–>用户代理->选择用户自定义。

通过设置useragent,在调试一些web程序的时候非常方便。

2005年04月08日

无意中搜索到的信息,却不全面.

从网上看到的一段话:

来自:http://bbs.055.cn/t197594.html

———————————————————————————-

用迷你歌词的,不要担心注册了!!

强烈提醒
现在中国大陆所谓的迷你歌词软体属于剽窃型软体,还要收费,这不是明摆着盗窃加
销赃!请各位看官方网站登陆点击download now就可以下载了!!

http://www.philocode.com/minilyrics/release.htm

看看,下载上面的迷你歌词,不用注册;再到

http://www.minilyrics.com/static/

看看。你们去那两个网站下载的同一软体,虽然版本号不一样,是国内的所谓迷你歌词只是把别人的
软件的版本号改一下就拿出来骗钱了!更讽刺的是,先前有几位网友提出:在3.4版本前,打开迷你歌
词的帮助文档,是英文帮助文档,在"support"中,可以找到

http://www.philocode.com/minilyrics/

此事一经曝光,大陆的迷你歌词组织立即出了一版有中文帮助的迷你歌词,并把

http://www.philocode.com/minilyrics/

删除!改变官方原版版本号!居心何在?!
如果大家不懂英文那里有个download now.点击那里就得了!
你们不要再受注册的烦扰了!国内的是骗人的~~~~~~想要免费的,就马上行动吧
下载地址:点击download now就可以下载了!!!

http://fileforum.betanews.com/download/1101013226/1

注意:中方最新版3.4.1491就是官方3.3.1480版本

———————————————————————————-

参考连接:

http://www.google.com/search?q=philocode&hl=zh-CN&lr=lang_zh-CN&ie=gb2312

http://www.philocode.com/minilyrics/release.htm

http://www.minilyrics.com/static/index.htm

http://www.viewlyrics.com/

http://seventh.jsphome.com/index.php?job=art&articleid=a_20050315_160813

http://www.viewlyrics.com/download/minilyrics.exe

http://www.donews.net/wushantao/archive/2005/03/30/317986.aspx

2005年03月12日
利用xml+xsl快速生成大量JSP的常用代码的方法.
 
参考Jbuilder的Servlet向导来使用xml+xsl产生JSP的常用代码。
xml样本:
 
<?xml version=”1.0″ encoding=”GB2312″?>
<?xml-stylesheet type=”text/xsl” href=”jspram.xsl”?>
<jsp xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”jspsrcgen.xsd”>
 <param>
  <variable>rloginusername</variable>
  <name>loginusername</name>
  <type>String</type>
  <src>request</src>
  <default>lizongbo</default>
  <desc>用户的登录名</desc>
 </param>
 <param>
  <variable>clastlogintime</variable>
  <name>lastlogintime</name>
  <type>long</type>
  <src>cookie</src>
  <default>0</default>
  <desc>用户最近一次的登录时间</desc>
 </param>
 <param>
  <variable>suserpass</variable>
  <name>userpass</name>
  <type>String</type>
  <src>session</src>
  <default>password</default>
  <desc>存放在session里的密码</desc>
 </param>
</jsp>
 
xsl文件略。
 
 
转换后的效果图和相关代码:
 

testjsp.jsp

变量名字 参数名字 变量类型 变量来源 默认值 备注
rloginusername loginusername String request lizongbo 用户的登录名
rloginusername loginusername String request lizongbo 用户的登录名
rloginusername loginusername String request lizongbo 用户的登录名
suserpass userpass String session password 存放在session里的密码
suserpass userpass String session password 存放在session里的密码
suserpass userpass String session password 存放在session里的密码
clastlogintime lastlogintime long cookie 0 用户最近一次的登录时间
clastlogintime lastlogintime long cookie 0 用户最近一次的登录时间
clastlogintime lastlogintime long cookie 0 用户最近一次的登录时间
生成好的java代码:
<%@page import=”com.lizongbo.util.JSPUtil”%>
//用户的登录名
String rloginusername = JSPUtil. getParameter(request,”loginusername”,lizongbo);
//用户的登录名
String rloginusername = JSPUtil. getParameter(request,”loginusername”,lizongbo);
//用户的登录名
String rloginusername = JSPUtil. getParameter(request,”loginusername”,lizongbo);
//存放在session里的密码
String suserpass = JSPUtil.getAttribute(session,”userpass”,password);
//存放在session里的密码
String suserpass = JSPUtil.getAttribute(session,”userpass”,password);
//存放在session里的密码
String suserpass = JSPUtil.getAttribute(session,”userpass”,password);
//用户最近一次的登录时间
long clastlogintime = JSPUtil. getValue(request.getCookies(),”lastlogintime”,0);
//用户最近一次的登录时间
long clastlogintime = JSPUtil. getValue(request.getCookies(),”lastlogintime”,0);
//用户最近一次的登录时间
long clastlogintime = JSPUtil. getValue(request.getCookies(),”lastlogintime”,0);
 
 
 
我封装的JSPUtil代码片断:
 
  public static string getparameter(httpservletrequest request, string name,
                                    string defval) {
    string param = request.getparameter(name);
    return (param != null ? param : defval);
  }
 
  public static boolean getparameter(httpservletrequest request, string name,
                                     boolean defval) {
    string bv = request.getparameter(name);
    return bv == null ? defval : parseboolean(bv);
 
  }
 
  public static double getparameter(httpservletrequest request, string name,
                                    double defval) {
    return parsedouble(request.getparameter(name), defval);
  }
 
  public static float getparameter(httpservletrequest request, string name,
                                   float defval) {
    return parsefloat(request.getparameter(name), defval);
  }
 
  public static int getparameter(httpservletrequest request, string name,
                                 int defval) {
    return parseint(request.getparameter(name), defval);
  }
 
  public static long getparameter(httpservletrequest request, string name,
                                  long defval) {
    return parselong(request.getparameter(name), defval);
  }
 
  public static short getparameter(httpservletrequest request, string name,
                                   short defval) {
    return parseshort(request.getparameter(name), defval);
  }

一般的javamil发送附件的代码如下:
                bodypart = new mimebodypart();
                datasource datasource = new filedatasource(“c:\测试附件.doc”);
                bodypart.setdatahandler(new datahandler(datasource));
                bodypart.setfilename(mimeutility.encodeword(“测试附件.doc”,”gb2312″, null));
                multipart.addbodypart(bodypart);
由于javamail 的包里默认的对javax.activation.datasource只有两个实现:
分别是:filedatasource和urldatasource。
因此在webapp里为了不把上传的文件再保存为本地文件,然后再使用filedatasource,
我结合apache的commons fileupload组件,写了一个实现了datasource的uploadfiledatasource。

其实代码非常简单,具体代码如下:

 

package com.lizongbo.util;

import java.io.*;

import javax.activation.*;
import org.apache.commons.fileupload.fileitem;

/**
 * <p>title: uploadfile datasource for javamail</p>
 * <p>description: </p>
 * <p>copyright: copyright (c) 2005</p>
 * <p>company: zongboli</p>
 * @author lizongbo
 * @version 1.0
 */
public class uploadfiledatasource implements datasource {
    private fileitem uploadfileitem = null;
    public uploadfiledatasource() {
    }

    public uploadfiledatasource(fileitem uploadfile) {
        this.uploadfileitem = uploadfile;
    }
    public string getcontenttype() {
        return uploadfileitem.getcontenttype();
    }

    public inputstream getinputstream() throws ioexception {
        return uploadfileitem.getinputstream();
    }

    public string getname() {
        return uploadfileitem.getname();
    }

    public outputstream getoutputstream() throws ioexception {
        return null;
    }

    public static void main(string[] args) {
    }
}

附在struts里的使用例子:

if (diskfileupload.ismultipartcontent(servletrequest)) {
            diskfileupload fileupload = new diskfileupload();
            fileupload.setsizemax(1024 * 1024);
            try {
                list filelist = fileupload.parserequest(servletrequest);
                iterator itr = filelist.iterator();
                fileitem item;
                while (itr.hasnext()) {
                    item = (fileitem) itr.next();
                    if (item.isformfield()) {
                        logger.debug(item.getfieldname() + “=” +
                                     item.getstring() + “”);
                    } else {
                     mimebodypart   bodypart = new mimebodypart();
                     datasource datasource = new com.webmail.util.uploadfiledatasource(item);
                     bodypart.setdatahandler(new datahandler(datasource));
                     multipart.addbodypart(bodypart);                    }
                }
            } catch (org.apache.commons.fileupload.fileuploadbase.
                     sizelimitexceededexception sle) {
                logger.debug(“size is too large”, sle);
            } catch (org.apache.commons.fileupload.fileuploadbase.
                     unknownsizeexception use) {
                logger.debug(“unknown size “, use);
            } catch (org.apache.commons.fileupload.fileuploadexception fue) {
                logger.debug(fue.getmessage() + “  “);
            } catch (exception e) {
                logger.debug(“chucuo”, e);
            }

        } else {
            logger.debug(“没有附件!!!”);
        }


由于《用javamail免认证方式发送邮件给163.com的用户的完整代码实例。》 代码被人copy直接运行, 给我带来了很大的麻烦(发了很多垃圾邮件到我邮箱 :( ),
从现在开始发布的代码,一律转为小写之后再进行发布,以仅供阅读参考。

 

2005年03月09日
 
 
SpamAssassin 在windows下的安装
 
SpamAssassin http://spamassassin.apache.org/ 是一个非常优秀的开源的反垃圾邮件过滤器。
支持很多邮件服务器。包括apache james,经过简单的配置,也可以使用SpamAssassin 来进行垃圾邮件过滤。
下面是在windows下安装SpamAssassin 的过程。
1.下载:
a.perl 5.8.6.811
 
b.SpamAssassin 3.0.2
 
c.nmake
 
 
2.安装,
a.先安装perl,运行按默认安装即可,我的安装在D:\Perl
b.运行Nmake15.exe,然后按提示在Nmake15.exe所在的目录下生成NMAKE.EXE和NMAKE.ERR,把这两个文件复制到D:\Perl\bin
c.在联网的状态下,进入到命令行,
运行。
 
c1.
D:\Perl\bin>ppm install DB_File
====================
Install ‘DB_File’ version 1.810 in ActivePerl 5.8.6.811.
====================
Installing D:\Perl\site\lib\auto\DB_File\DB_File.bs
Installing D:\Perl\site\lib\auto\DB_File\DB_File.dll
Installing D:\Perl\site\lib\auto\DB_File\DB_File.exp
Installing D:\Perl\site\lib\auto\DB_File\DB_File.lib
Installing D:\Perl\html\site\lib\DB_File.html
Files found in blib\arch: installing files in blib\lib into architecture depende
nt library tree
Installing D:\Perl\site\lib\DB_File.pm
Installing D:\Perl\site\lib\auto\DB_File\autosplit.ix
Successfully installed DB_File version 1.810 in ActivePerl 5.8.6.811.
 
 
c2.
 

D:\Perl\bin>ppm install HTML-Parser
Note: Package ‘HTML-Parser’ is already installed.

 
c3.
 

D:\Perl\bin>ppm install Digest-SHA1
Note: Package ‘Digest-SHA1′ is already installed.

 
c4.
 
D:\Perl\bin>ppm install Time-HiRes
====================
Install ‘Time-HiRes’ version 1.49 in ActivePerl 5.8.6.811.
====================
Installing D:\Perl\site\lib\auto\Time\HiRes\HiRes.bs
Installing D:\Perl\site\lib\auto\Time\HiRes\HiRes.dll
Installing D:\Perl\site\lib\auto\Time\HiRes\HiRes.exp
Installing D:\Perl\site\lib\auto\Time\HiRes\HiRes.lib
Installing D:\Perl\html\site\lib\Time\HiRes.html
Files found in blib\arch: installing files in blib\lib into architecture depende
nt library tree
Installing D:\Perl\site\lib\Time\HiRes.pm
Successfully installed Time-HiRes version 1.49 in ActivePerl 5.8.6.811.
 
c5.
 

D:\Perl\bin>ppm install IP-Country
====================
Install ‘Geography-Countries’ version 1.4 in ActivePerl 5.8.6.811.
====================
Installing D:\Perl\html\site\lib\Geography\Countries.html
Installing D:\Perl\site\lib\Geography\Countries.pm
Successfully installed Geography-Countries version 1.4 in ActivePerl 5.8.6.811.
====================
Install ‘IP-Country’ version 2.18 in ActivePerl 5.8.6.811.
====================
Installing D:\Perl\html\site\lib\IP\Authority.html
Installing D:\Perl\html\site\lib\IP\Country.html
Installing D:\Perl\html\site\lib\IP\Country\Fast.html
Installing D:\Perl\html\site\lib\IP\Country\MaxMind.html
Installing D:\Perl\html\site\lib\IP\Country\Medium.html
Installing D:\Perl\html\site\lib\IP\Country\Slow.html
Installing D:\Perl\html\bin\ip2cc.html
Installing D:\Perl\site\lib\IP\Authority.pm
Installing D:\Perl\site\lib\IP\Country.pm
Installing D:\Perl\site\lib\IP\Country\Fast.pm
Installing D:\Perl\site\lib\IP\Country\MaxMind.pm
Installing D:\Perl\site\lib\IP\Country\Medium.pm
Installing D:\Perl\site\lib\IP\Country\Slow.pm
Installing D:\Perl\site\lib\IP\Country\Fast\cc.gif
Installing D:\Perl\site\lib\IP\Country\Fast\ip.gif
Installing D:\Perl\site\lib\IP\Authority\auth.gif
Installing D:\Perl\site\lib\IP\Authority\ipauth.gif
Installing D:\Perl\bin\ip2cc
Installing D:\Perl\bin\ip2cc.bat
Successfully installed IP-Country version 2.18 in ActivePerl 5.8.6.811.
 
c6.
 

D:\Perl\bin>ppm install Mail-SPF-Query
====================
Install ‘Net-DNS’ version 0.48 in ActivePerl 5.8.6.811.
====================
Installing D:\Perl\html\site\lib\Net\DNS.html
Installing D:\Perl\html\site\lib\Net\DNS\FAQ.html
Installing D:\Perl\html\site\lib\Net\DNS\Header.html
Installing D:\Perl\html\site\lib\Net\DNS\Nameserver.html
Installing D:\Perl\html\site\lib\Net\DNS\Packet.html
Installing D:\Perl\html\site\lib\Net\DNS\Question.html
Installing D:\Perl\html\site\lib\Net\DNS\Resolver.html
Installing D:\Perl\html\site\lib\Net\DNS\RR.html
Installing D:\Perl\html\site\lib\Net\DNS\Update.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\A.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\AAAA.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\AFSDB.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\CERT.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\CNAME.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\DNAME.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\EID.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\HINFO.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\ISDN.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\LOC.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\MB.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\MG.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\MINFO.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\MR.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\MX.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\NAPTR.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\NIMLOC.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\NS.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\NSAP.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\NULL.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\OPT.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\PTR.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\PX.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\RP.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\RT.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\SOA.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\SRV.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\SSHFP.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\TKEY.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\TSIG.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\TXT.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\Unknown.html
Installing D:\Perl\html\site\lib\Net\DNS\RR\X25.html
Installing D:\Perl\html\site\lib\Net\DNS\Resolver\Base.html
Installing D:\Perl\html\site\lib\Net\DNS\Resolver\Cygwin.html
Installing D:\Perl\html\site\lib\Net\DNS\Resolver\Recurse.html
Installing D:\Perl\html\site\lib\Net\DNS\Resolver\UNIX.html
Installing D:\Perl\html\site\lib\Net\DNS\Resolver\Win32.html
Installing D:\Perl\site\lib\Net\DNS.pm
Installing D:\Perl\site\lib\Net\DNS\FAQ.pod
Installing D:\Perl\site\lib\Net\DNS\Header.pm
Installing D:\Perl\site\lib\Net\DNS\Nameserver.pm
Installing D:\Perl\site\lib\Net\DNS\Packet.pm
Installing D:\Perl\site\lib\Net\DNS\Question.pm
Installing D:\Perl\site\lib\Net\DNS\Resolver.pm
Installing D:\Perl\site\lib\Net\DNS\RR.pm
Installing D:\Perl\site\lib\Net\DNS\Update.pm
Installing D:\Perl\site\lib\Net\DNS\RR\A.pm
Installing D:\Perl\site\lib\Net\DNS\RR\AAAA.pm
Installing D:\Perl\site\lib\Net\DNS\RR\AFSDB.pm
Installing D:\Perl\site\lib\Net\DNS\RR\CERT.pm
Installing D:\Perl\site\lib\Net\DNS\RR\CNAME.pm
Installing D:\Perl\site\lib\Net\DNS\RR\DNAME.pm
Installing D:\Perl\site\lib\Net\DNS\RR\EID.pm
Installing D:\Perl\site\lib\Net\DNS\RR\HINFO.pm
Installing D:\Perl\site\lib\Net\DNS\RR\ISDN.pm
Installing D:\Perl\site\lib\Net\DNS\RR\LOC.pm
Installing D:\Perl\site\lib\Net\DNS\RR\MB.pm
Installing D:\Perl\site\lib\Net\DNS\RR\MG.pm
Installing D:\Perl\site\lib\Net\DNS\RR\MINFO.pm
Installing D:\Perl\site\lib\Net\DNS\RR\MR.pm
Installing D:\Perl\site\lib\Net\DNS\RR\MX.pm
Installing D:\Perl\site\lib\Net\DNS\RR\NAPTR.pm
Installing D:\Perl\site\lib\Net\DNS\RR\NIMLOC.pm
Installing D:\Perl\site\lib\Net\DNS\RR\NS.pm
Installing D:\Perl\site\lib\Net\DNS\RR\NSAP.pm
Installing D:\Perl\site\lib\Net\DNS\RR\NULL.pm
Installing D:\Perl\site\lib\Net\DNS\RR\OPT.pm
Installing D:\Perl\site\lib\Net\DNS\RR\PTR.pm
Installing D:\Perl\site\lib\Net\DNS\RR\PX.pm
Installing D:\Perl\site\lib\Net\DNS\RR\RP.pm
Installing D:\Perl\site\lib\Net\DNS\RR\RT.pm
Installing D:\Perl\site\lib\Net\DNS\RR\SOA.pm
Installing D:\Perl\site\lib\Net\DNS\RR\SRV.pm
Installing D:\Perl\site\lib\Net\DNS\RR\SSHFP.pm
Installing D:\Perl\site\lib\Net\DNS\RR\TKEY.pm
Installing D:\Perl\site\lib\Net\DNS\RR\TSIG.pm
Installing D:\Perl\site\lib\Net\DNS\RR\TXT.pm
Installing D:\Perl\site\lib\Net\DNS\RR\Unknown.pm
Installing D:\Perl\site\lib\Net\DNS\RR\X25.pm
Installing D:\Perl\site\lib\Net\DNS\Resolver\Base.pm
Installing D:\Perl\site\lib\Net\DNS\Resolver\Cygwin.pm
Installing D:\Perl\site\lib\Net\DNS\Resolver\Recurse.pm
Installing D:\Perl\site\lib\Net\DNS\Resolver\UNIX.pm
Installing D:\Perl\site\lib\Net\DNS\Resolver\Win32.pm
Successfully installed Net-DNS version 0.48 in ActivePerl 5.8.6.811.
Can’t remove directory C:\TEMP/Net-DNS-0-2784-1110293328/blib/html/site/lib/Net/
DNS: Directory not empty at D:/Perl/site/lib/PPM/Repository.pm line 247
Can’t remove directory C:\TEMP/Net-DNS-0-2784-1110293328/blib/html/site/lib/Net:
 Directory not empty at D:/Perl/site/lib/PPM/Repository.pm line 247
Can’t remove directory C:\TEMP/Net-DNS-0-2784-1110293328/blib/html/site/lib: Dir
ectory not empty at D:/Perl/site/lib/PPM/Repository.pm line 247
Can’t remove directory C:\TEMP/Net-DNS-0-2784-1110293328/blib/html/site: Directo
ry not empty at D:/Perl/site/lib/PPM/Repository.pm line 247
Can’t remove directory C:\TEMP/Net-DNS-0-2784-1110293328/blib/html: Directory no
t empty at D:/Perl/site/lib/PPM/Repository.pm line 247
Can’t remove directory C:\TEMP/Net-DNS-0-2784-1110293328/blib: Directory not emp
ty at D:/Perl/site/lib/PPM/Repository.pm line 247
Can’t remove directory C:\TEMP/Net-DNS-0-2784-1110293328: Directory not empty at
 D:/Perl/site/lib/PPM/Repository.pm line 247
====================
Install ‘Net-CIDR-Lite’ version 0.15 in ActivePerl 5.8.6.811.
====================
Installing D:\Perl\html\site\lib\Net\CIDR\Lite.html
Installing D:\Perl\site\lib\Net\CIDR\Lite.pm
Successfully installed Net-CIDR-Lite version 0.15 in ActivePerl 5.8.6.811.
====================
Install ‘Sys-Hostname-Long’ version 1.2 in ActivePerl 5.8.6.811.
====================
Installing D:\Perl\html\site\lib\Sys\Hostname\Long.html
Installing D:\Perl\site\lib\Sys\Hostname\Long.pm
Installing D:\Perl\site\lib\Sys\Hostname\testall.pl
Successfully installed Sys-Hostname-Long version 1.2 in ActivePerl 5.8.6.811.
====================
Install ‘Mail-SPF-Query’ version 1.997 in ActivePerl 5.8.6.811.
====================
Installing D:\Perl\html\site\lib\Mail\SPF\Query.html
Installing D:\Perl\site\lib\Mail\SPF\Query.pm
Installing D:\Perl\bin\spfd
Installing D:\Perl\bin\spfd.bat
Installing D:\Perl\bin\spfquery
Installing D:\Perl\bin\spfquery.bat
Successfully installed Mail-SPF-Query version 1.997 in ActivePerl 5.8.6.811.
 
 
c7.
 

D:\Perl\bin>ppm install Net-DNS
Note: Package ‘Net-DNS’ is already installed.
 
(在安装Mail-SPF-Query时被自动安装好了。)
 
 
 
d.解压Mail-SpamAssassin-3.0.2.zip,到D:\Mail-SpamAssassin-3.0.2
 
e.编译
 

D:\Perl\bin>cd D:\Mail-SpamAssassin-3.0.2
 
D:\Mail-SpamAssassin-3.0.2>PERL makefile.pl
Build spamc.exe (environment must be set up for C compiler)? (y/n) [y] n
What email address or URL should be used in the suspected-spam report
text for users who want more information on your filter installation?
(In particular, ISPs should change this to a local Postmaster contact)
default text: [the administrator of that system] lizongbo@gmail.com
 
Check network rules during ‘make test’ (test scripts may fail due to
network problems)? (y/n) [n] y
 
Checking if your kit is complete…
Looks good
Writing Makefile for Mail::SpamAssassin
Makefile written by ExtUtils::MakeMaker 6.17
 
 
 
f.nmake
 

D:\Mail-SpamAssassin-3.0.2>nmake
 
Microsoft (R) Program Maintenance Utility   Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.
 
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/AutoWhitelist.pm >blib\lib\Mail\Sp
mAssassin\AutoWhitelist.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Dns.pm >blib\lib\Mail\SpamAssassin
Dns.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Message/Metadata/Received.pm >blib
lib\Mail\SpamAssassin\Message\Metadata\Received.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Message/Metadata.pm >blib\lib\Mail
SpamAssassin\Message\Metadata.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/BayesStore.pm >blib\lib\Mail\SpamA
sassin\BayesStore.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Message/Node.pm >blib\lib\Mail\Spa
Assassin\Message\Node.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Locker.pm >blib\lib\Mail\SpamAssas
in\Locker.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/PluginHandler.pm >blib\lib\Mail\Sp
mAssassin\PluginHandler.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Conf.pm >blib\lib\Mail\SpamAssassi
\Conf.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Util.pm >blib\lib\Mail\SpamAssassi
\Util.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Message.pm >blib\lib\Mail\SpamAssa
sin\Message.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/ArchiveIterator.pm >blib\lib\Mail\
pamAssassin\ArchiveIterator.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/MailingList.pm >blib\lib\Mail\Spam
ssassin\MailingList.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Conf/Parser.pm >blib\lib\Mail\Spam
ssassin\Conf\Parser.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Reporter.pm >blib\lib\Mail\SpamAss
ssin\Reporter.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Locales.pm >blib\lib\Mail\SpamAssa
sin\Locales.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Conf/LDAP.pm >blib\lib\Mail\SpamAs
assin\Conf\LDAP.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/HTML.pm >blib\lib\Mail\SpamAssassi
\HTML.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/DBBasedAddrList.pm >blib\lib\Mail\
pamAssassin\DBBasedAddrList.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/SQLBasedAddrList.pm >blib\lib\Mail
SpamAssassin\SQLBasedAddrList.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Plugin/Hashcash.pm >blib\lib\Mail\
pamAssassin\Plugin\Hashcash.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Plugin.pm >blib\lib\Mail\SpamAssas
in\Plugin.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm >blib\lib\Mail\
pamAssassin\Plugin\URIDNSBL.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/PersistentAddrList.pm >blib\lib\Ma
l\SpamAssassin\PersistentAddrList.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin.pm >blib\lib\Mail\SpamAssassin.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Locker/Flock.pm >blib\lib\Mail\Spa
Assassin\Locker\Flock.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/BayesStore/SQL.pm >blib\lib\Mail\S
amAssassin\BayesStore\SQL.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Plugin/SPF.pm >blib\lib\Mail\SpamA
sassin\Plugin\SPF.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Bayes.pm >blib\lib\Mail\SpamAssass
n\Bayes.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Conf/SQL.pm >blib\lib\Mail\SpamAss
ssin\Conf\SQL.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/TextCat.pm >blib\lib\Mail\SpamAssa
sin\TextCat.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/NetSet.pm >blib\lib\Mail\SpamAssas
in\NetSet.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/PerMsgStatus.pm >blib\lib\Mail\Spa
Assassin\PerMsgStatus.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/BayesStore/DBM.pm >blib\lib\Mail\S
amAssassin\BayesStore\DBM.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Constants.pm >blib\lib\Mail\SpamAs
assin\Constants.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/PerMsgLearner.pm >blib\lib\Mail\Sp
mAssassin\PerMsgLearner.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/EvalTests.pm >blib\lib\Mail\SpamAs
assin\EvalTests.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Locker/Win32.pm >blib\lib\Mail\Spa
Assassin\Locker\Win32.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Plugin/RelayCountry.pm >blib\lib\M
il\SpamAssassin\Plugin\RelayCountry.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Locker/UnixNFSSafe.pm >blib\lib\Ma
l\SpamAssassin\Locker\UnixNFSSafe.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Plugin/Test.pm >blib\lib\Mail\Spam
ssassin\Plugin\Test.pm
D:\Perl\bin\perl.exe build/preprocessor -Mconditional -Mvars -DVERSION=3.000002
-DPREFIX=D:\Perl\site <lib/Mail/SpamAssassin/Util/RegistrarBoundaries.pm >blib\
ib\Mail\SpamAssassin\Util\RegistrarBoundaries.pm
        D:\Perl\bin\perl.exe build/preprocessor  -Mvars  -DVERSION=”3.000002″
DPREFIX=”D:\Perl\site”  -DDEF_RULES_DIR=”D:\Perl\site/share/spamassassin”  -DLO
AL_RULES_DIR=”D:\Perl\site/etc/mail/spamassassin”  -DINSTALLSITELIB=”D:\Perl\si
e\lib”  -DCONTACT_ADDRESS=”lizongbo@gmail.com” -Msharpbang  -DPERL_BIN=”D:\Perl
bin\perl.exe”  -DPERL_WARN=”"  -DPERL_TAINT=”" -m755 -isa-learn.raw -osa-learn
        D:\Perl\bin\perl.exe -MExtUtils::Command -e cp sa-learn blib\script\sa-
earn
        pl2bat.bat blib\script\sa-learn
        D:\Perl\bin\perl.exe build/preprocessor  -Mvars  -DVERSION=”3.000002″
DPREFIX=”D:\Perl\site”  -DDEF_RULES_DIR=”D:\Perl\site/share/spamassassin”  -DLO
AL_RULES_DIR=”D:\Perl\site/etc/mail/spamassassin”  -DINSTALLSITELIB=”D:\Perl\si
e\lib”  -DCONTACT_ADDRESS=”lizongbo@gmail.com” -Msharpbang  -DPERL_BIN=”D:\Perl
bin\perl.exe”  -DPERL_WARN=”"  -DPERL_TAINT=”" -m755 -ispamassassin.raw -ospama
sassin
        D:\Perl\bin\perl.exe -MExtUtils::Command -e cp spamassassin blib\script
spamassassin
        pl2bat.bat blib\script\spamassassin
 
D:\Mail-SpamAssassin-3.0.2>
 
g.安装
 

D:\Mail-SpamAssassin-3.0.2>nmake INSTALL
 
Microsoft (R) Program Maintenance Utility   Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.
 
Installing D:\Perl\site\lib\Mail\SpamAssassin.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\AutoWhitelist.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Dns.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\BayesStore.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Locker.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\PluginHandler.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Conf.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Util.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Message.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\ArchiveIterator.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\MailingList.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Reporter.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Locales.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\HTML.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\DBBasedAddrList.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\SQLBasedAddrList.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Plugin.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\PersistentAddrList.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Bayes.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\TextCat.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\NetSet.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\PerMsgStatus.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Constants.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\PerMsgLearner.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\EvalTests.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Message\Metadata.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Message\Node.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Message\Metadata\Received.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Conf\Parser.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Conf\LDAP.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Conf\SQL.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Plugin\Hashcash.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Plugin\URIDNSBL.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Plugin\SPF.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Plugin\RelayCountry.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Plugin\Test.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Locker\Flock.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Locker\Win32.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Locker\UnixNFSSafe.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\BayesStore\SQL.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\BayesStore\DBM.pm
Installing D:\Perl\site\lib\Mail\SpamAssassin\Util\RegistrarBoundaries.pm
Installing D:\Perl\bin\sa-learn
Installing D:\Perl\bin\sa-learn.bat
Installing D:\Perl\bin\spamassassin
Installing D:\Perl\bin\spamassassin.bat
Appending installation info to D:\Perl\lib/perllocal.pod
        D:\Perl\bin\perl.exe “-MExtUtils::Command” -e mkpath D:\Perl\site/etc/ma
il/spamassassin
        D:\Perl\bin\perl.exe -MFile::Spec -MFile::Copy  -e “copy(q{rules/local.c
f}, q{D:\Perl\site/etc/mail/spamassassin/local.cf}) unless -f q{D:\Perl\site/etc
/mail/spamassassin/local.cf};”
        D:\Perl\bin\perl.exe -MFile::Spec -MFile::Copy  -e “copy(q{rules/init.pr
e}, q{D:\Perl\site/etc/mail/spamassassin/init.pre}) unless -f q{D:\Perl\site/etc
/mail/spamassassin/init.pre};”
        D:\Perl\bin\perl.exe “-MExtUtils::Command” -e mkpath D:\Perl\site/share/
spamassassin
        D:\Perl\bin\perl.exe -e “map unlink, <D:\Perl\site/share/spamassassin/*>

        D:\Perl\bin\perl.exe build/preprocessor -Mvars  -DVERSION=”3.000002″  -D
PREFIX=”D:\Perl\site”  -DDEF_RULES_DIR=”D:\Perl\site/share/spamassassin”  -DLOCA
L_RULES_DIR=”D:\Perl\site/etc/mail/spamassassin”  -DINSTALLSITELIB=”D:\Perl\site
\lib”  -DCONTACT_ADDRESS=”lizongbo@gmail.com” -m644 -Irules -OD:\Perl\site/share
/spamassassin 10_misc.cf 20_anti_ratware.cf 20_body_tests.cf 20_compensate.cf 20
_dnsbl_tests.cf 20_drugs.cf 20_fake_helo_tests.cf 20_head_tests.cf 20_html_tests
.cf 20_meta_tests.cf 20_phrases.cf 20_porn.cf 20_ratware.cf 20_uri_tests.cf 23_b
ayes.cf 25_body_tests_es.cf 25_hashcash.cf 25_spf.cf 25_uribl.cf 30_text_de.cf 3
0_text_fr.cf 30_text_nl.cf 30_text_pl.cf 50_scores.cf 60_whitelist.cf user_prefs
.template triplets.txt languages
        D:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 755 D:\Perl\site/share
/spamassassin
 
h.设置
记事本打开d:\perl\bin\spamasasssin.bat
在第二行(@echo off)后面加上下面两行:
SET RES_NAMESERVERS=192.168.9.1
SET LANG=zh_CN
 
 
 
 
 
 
下载垃圾邮件过滤规则文件:http://www.ccert.edu.cn/spam/sa/Chinese_rules.cf
然后覆盖:D:\Perl\site\etc\mail\spamassassin\local.cf
 
 
打开local.cf,在最后加上
 

use_razor2 0
use_dcc 0
use_pyzor 0

 
 

D:\Perl\site\etc\mail\spamassassin

新建pod.bat。
内容如下:
 
REM Run from the top of the SpamAssassin install directory
mkdir \spamdocs
mkdir \spamdocs\geek
mkdir \spamdocs\plugins
del \spamdocs\*.*
del \spamdocs\geek\*.*
del \spamdocs\plugins\*.*
call pod2html spamassassin.raw --outfile \spamdocs\spamassassin.html
call pod2html sa-learn. --outfile \spamdocs\sa-learn.html
call pod2html lib\mail\spamassassin\AutoWhiteList.pm --outfile \spamdocs\geek\AutoWhiteList.html
call pod2html lib\mail\spamassassin\Bayes.pm --outfile \spamdocs\Bayes.html
call pod2html lib\mail\spamassassin\Message\Metadata.pm --outfile \spamdocs\geek\MessageMetaData.html
call pod2html lib\mail\spamassassin\Message\Node.pm --outfile \spamdocs\geek\MessageNode.html
call pod2html lib\mail\spamassassin\BayesStore\SQL.pm --outfile \spamdocs\geek\BayesStoreSQL.html
call pod2html lib\mail\spamassassin\BayesStore.pm --outfile \spamdocs\geek\BayesStore.html
call pod2html lib\mail\spamassassin\conf.pm --outfile \spamdocs\conf.html
call pod2html lib\mail\spamassassin\Conf\SQL.pm --outfile \spamdocs\geek\confSQL.html
call pod2html lib\mail\spamassassin\Conf\LDAP.pm --outfile \spamdocs\geek\confLDAP.html
call pod2html lib\mail\spamassassin\Conf\Parser.pm --outfile \spamdocs\geek\confParser.html
call pod2html lib\mail\spamassassin\permsgstatus.pm --outfile \spamdocs\geek\permsgstatus.html
call pod2html lib\mail\spamassassin\message.pm --outfile \spamdocs\geek\message.html --quiet
call pod2html lib\mail\spamassassin\permsglearner.pm --outfile \spamdocs\geek\permsglearner.html
call pod2html lib\mail\spamassassin\plugin.pm --outfile \spamdocs\geek\PluginsArchitecture.html
call pod2html lib\mail\spamassassin\persistentaddrlist.pm --outfile \spamdocs\geek\Persistentaddrlist.html
call pod2html lib\mail\spamassassin\SQLBasedAddrList.pm --outfile \spamdocs\geek\SQLBasedAddrList.html
call pod2html lib\mail\spamassassin.pm --outfile \spamdocs\geek\spamassassinclass.html
cd lib\mail\spamassassin\plugin
for %%f in (*.*) do call pod2html %%f --outfile \spamdocs\plugins\%%f.html --quiet
cd ..\..\..\..
 
 测试:
 

D:\MAIL-S~1.2>spamassassin -D < sample-spam.txt
复制 D:\Mail-SpamAssassin-3.0.2\spamd\spamd.raw到D:\Perl\bin
 
参考 http://wiki.apache.org/spamassassin/SpamdOnWindows 制作SpamD.bat
运行SpamD.bat就可以启动spamassassin了。
 
 
 
参考:
 
 
2005年02月22日
网络环境如下:
 
三台服务器。
1.网关,公网IP,
2.domino邮件服务器。
3.另一台服务器。
 
通过把网关的端口25,映射到domino服务器上,让domino服务器可以收发邮件。
同时domino服务器还要把部分邮件转发到服务器3上。
大家的发邮件smtp统一是domino服务器。
由于domino过滤垃圾邮件服务器的功能不强,并且,为了实现转发邮件,因此domino服务器被迫取消了smtp验证,
即使用open reply模式。
在这种情况下,自从服务器被人盯上用来进行垃圾邮件发送和中转之后,
给服务器的性能带来很大影响,也影响了正常邮件的收发。
 
Apache James是个非常优秀的邮件服务器。
由于实际情况的特殊,没有办法通过简单的配置来同时不发送垃圾邮件和正常转发邮件到domino服务器,
在察看james文档之后,通过实现mailets接口来做到了这件事情。
 
现在的网络配置如下。
增加一台服务器,运行james,邮件域名和domino的一致。(因为域名一致,所以无法使用james内置的forward,才需要自己来实现邮件发送功能)
修改james的配置信息,使之需要smtp验证,网关端口25映射到james服务器的25端口上。
我增加了一个james matcher。来匹配邮件并进行发送到domino服务器。
大致代码如下:
 private String domain = “lizongbo.com”;
 public Collection match(Mail mail) throws MessagingException {
        if ((mail.getSender().toString().indexOf(this.getDomain()) > 0)) {
            System.out.println(“收到来自” + mail.getSender() + “的邮件”);
            String path = “mailsavein/” + System.currentTimeMillis()
                          + “.txt”;
            savemail(mail, path);
            JavaMailSender jms = new JavaMailSender();
            jms.sendmail(path);
        }
        for (Iterator i = mail.getRecipients().iterator(); i.hasNext(); ) {
            MailAddress rec = (MailAddress) i.next();
            if (rec.toString().indexOf(this.getDomain()) > 0) {
                System.out.println( “收到” + mail.getSender()
                                   + “一封发给” + rec + “的邮件”);
                String path = “mailsavein/” + System.currentTimeMillis()
                              + “.txt”;
                savemail(mail, path);
                JavaMailSender jms = new JavaMailSender();
                jms.sendmail(path);
            }
        }
        return mail.getRecipients();
    }
 
 
经过配置运行,现在domino服务器无法再会被外网的人利用起来进行垃圾邮件的发送了。
这样保证了domino服务器的稳定,也省下了买专门的邮件网关的开销。
 
通过对james的扩展,还可以实现很多更强大的垃圾邮件过滤,杀毒过滤,与SpamAssasin结合进行垃圾邮件过滤等等。
具体可以参考:http://wiki.apache.org/james
 
 
由于james使用的开发框架avalon落后,已经被apache终止。因此james3.x版本需要大的改动和升级,期待3.0版本的出现,能够提供更强大的功能。

2005年02月21日


先是直接的收件人地址.
然后cc表示抄送人地址
bcc:密送人地址。
subject:邮件标题
body:邮件内容.

示例如:
mailto:lizongbo@gamil.com?cc=lizongbo@msn.com&bcc=test@test.com&subject=test&body=Hello

see : http://www.gitnet.de/content/web-design/html/tipps/mailto.htm

2005年02月19日

出于安全考虑,只给出最简单的不带危险操作的演示例子。 copyright © lizongbo
这个例子的前提条件是你此刻已经登陆了csdn的论坛并且正是在线状态。
(根据浏览器对临时会话的继承机制,是否必须使用myie我不太确定,本例子仅在myie(Maxthon) 里测试)
打开下面的连接可以看到最简单的效果:
copyright © lizongbo


http://community.csdn.net/Expert/ForumList_Search.asp?searchtype=2&bigclassid=14&smallclassid=1404&searchKeys=<script%20language=’javascript’>alert(‘testonly’)</script>&author=&tabletype=now&Submit2=

这个连接是csdn论坛的搜索连接。

本示例没有用来作会造成任何任何真正危险的事情。请放心点击察看效果。
就我所知: 
1.这里的blog也是支持javascript的,
2.csdn的用户信息cookie虽然是加密的,却不是会动态改变的,
3.更可怕是csdn采取cookie实现的单点登陆机制,它的某些cookie的domain是csdn.net。

所以如果有人把这几个条件都利用了起来,扩展一下思路,那么将可能弄出给访问csdn网站的用户带来一定的危险的东西。

但愿csdn有关人员可以及时的弥补上一些缺陷。

copyright © lizongbo