1、 上传postal-0.70.tgz到欲测试的邮件服务器上,也可以安装在别的计算机上,只要把邮件服务器设置能需要被测试的ip就可以了

2、 在/opt目录下解压
 
 
  
  1. [root@jdserver2 opt]# tar zxvf postal-0.70.tgz   
3、 编译、安装
 
 
  
  1. [root@jdserver2 opt]# cd postal-0.70  
  2. [root@jdserver2 postal-0.70]# ./configure  
  3. [root@jdserver2 postal-0.70]# make && make install  
4、 查看下postal用法
 
 
  
  1. [root@jdserver2 /]# postal  
  2. Usage: postal [-m maximum-message-size] [-M minimum-message-size] [-t threads]  
  3.               [-c messages-per-connection] [-r messages-per-minute] [-a]  
  4.               [-b [no]netscape] [-p port] [-[z|Z] debug-file]  
  5.               [-l local-address] [-f sender-file]  
  6.               smtp-server user-list-filename  
  7.    
  8. Postal Version: 0.70  
5、 编写一个测试脚本testmail.sh
 
  
  1. #!/bin/bash  
  2.    
  3. MAX_MSG_SIZE=500                //邮件最大为500k  
  4. PORT=25                          //端口号  
  5. MSG_PER_CONN=1              //1次连接发送1封邮件  
  6. MSG_PER_MIN=5000             //1分钟发送5000封邮件  
  7. SMTP_HOST=192.168.80.245      //需要测试的邮件服务器IP  
  8. postal -m $MAX_MSG_SIZE -p $PORT -c $MSG_PER_CONN -r $MSG_PER_MIN -a \  
  9.  $SMTP_HOST test.lst  
  10. ~         
                       
6、 建立一个test.lst文件
Test.lst文件中放入192.168.80.245邮件服务器上的账户
内容如下:
 
  
  1. Test1@123.cn  
  2. Test2@123.cn  
  3. Test3@123.cn  
  4. Test4@123.cn  
 
7、 在这个机器上执行这个脚本
 
  
  1. [root@jdserver /]# ./testmail.sh   
  2. time,messages,data(K),errors,connections,SSL connections  
  3. 16:48,83,22349,0,84,0  
  4. 16:49,660,164785,0,660,0  
  5. 16:50,627,156822,0,627,0  
  6. 16:51,587,142083,0,587,0  
  7. 16:52,570,146765,0,570,0  
  8. 16:53,575,147440,0,575,0  
  9. 16:54,587,142252,0,587,0  
  10. 16:55,486,125082,0,486,0  
  11. 16:56,445,110180,0,445,0  
  12. 16:57,459,117040,0,459,0  
 
我的机器是IBM P520小型机,2个Power 6 CPU,主频4.2GHz,内存为4GB。安装RHEL 5.5操作系统。