一、基本知识:
   
  Sendmail是在Unix环境下使用最广泛的邮件传输代理程序,Sendmail邮件服务器的特点是功能强大但配置复杂,sendmail的版本升级非常频繁,可以通过telnet到主机的25号端口来判断该主机使用的sendmail版本号。例如:

  telnet xxx.xxx.xxx.xxx 25

  220 xxx.xxx.xxx.xxx ESMTP Sendmail 8.12.1/8.12.1; Thu, 22 AUG 2002 10:33:21 0800 (EAT)

  上述信息表明该主机运行的是sendmail8.12.1。版本号一般由被两个圆点分开的三个数字组成。当前运行的绝大多数是sendmail 8.x.x。如果在sendmail服务器上,可以运行sendmail –d0.4来查看版本情况,例如:Version AIX4.3/8.12.1

  sendmail的启动、停止和刷新,可以使用以下命令:

  startsrc –s sendmail,也可以带参数:startsrc –s sendmail -a "-bd -q30m"

  stopsrc –s sendmail

  refresh –s sendmail

  查看sendmail的状态:

  lssrc –s sendmail

  配置开机自动启动sendmail

  编辑/etc/rc.tcpip,找到start /usr/lib/sendmail这一行,如果被注释掉了,取消注释,找到并设置qpi参数,缺省是30分钟,即qpi=30m(s代表秒,m代表分钟,h代表小时,d代表天,w代表星期)。m是缺省。

  手工启动sendmail如:

  sendmail –q15m

  -q 后面的参数值同qpi。

  Sendmail是一个守护进程(daemon),是一个信息路由程序,Sendmail通过syslogd daemon来记录邮件系统的活动。要能够做到这一点,/etc/syslog.conf 必须包括以下行:

  mail.debug /var/spool/mqueue/log

  如果/var/spool/mqueue/log不存在, touch /var/spool/mqueue/log

  然后重起syslogd:refresh –s syslogd

  邮件队列目录是/var/spool/mqueue,邮件队列的内容可以由mailq或sendmail –bp打印出来。邮件队列包含四类邮件队列文件:数据文件、控制文件、临时文件和抄本文件。文件的格式如下:

  dfAA00312 数据文件

  qfAA00312 控制文件

  tfAA00312 临时文件

  xfAA00312 抄本文件

  显示邮件的统计信息:

  touch /var/tmp/sendmail.st,此文件必须先建立,否则无法用mailstats来查看统计信息.

  使用邮件别名和转发:

  别名的定义放在/etc/aliases文件中,举例添加一个别名manager,在/etc/aliases中增加一行:

  manager:caddy,zhang,joan@xxx.com

  再对这个别名产生一个所有者,如果sendmail对这个别名发送邮件有误,它会发一个出错信息给所有者。

  在/etc/aliases中增加一行:

  owner-manager:mars@xxx.com.cn

  用newaliases或 sendmail –bi重新编译/etc/aliases,再重起sendmail,mail manager 就可以给caddy,zhang,joan@xxx.com发邮件了。

  转发邮件可以使用/etc/aliases,也可以使用$HOME/.forward。

  使用/etc/aliases的例子:

  tom:zhang, joan@xxx.com

  这样的话,tom收不到任何邮件,邮件发给zhang, joan@xxx.com,如果tom也希望收到,上一行做如下修改:

  tom:\tom,zhang, joan@xxx.com

  自动删除tom的邮件:

  tom:/dev/null

  使用$HOME/.forward的例子:

  编辑该用户(假设是tom)主目录下的.forward文件如下:

  zhang, joan@xxx.com

  如果tom也希望收到,上一行做如下修改:

  \tom,zhang, joan@xxx.com

  自动删除tom的邮件:

  /dev/null

  对$HOME/.forward的修改一存盘就即刻生效,不象/etc/aliases还需重新编译。

  发邮件给本机用户:mail tom

  发邮件给本网络其它主机用户:mail john@mars mars为主机名

  给Internet邮箱用户发邮件:mail joan@xxx.com

  使用BNU或UUCP发邮件:mail @InternetSystem:UUCPSystem!username

  邮件的存储:

  系统邮箱为/var/spool/mail目录下,用户一旦读取就自动保存在$HOME/mbox目录下,如果在产生邮件过程中被中断,就将这些不完整的信息存放在$HOME/dead.letter。

  二、配置sendmail通过SMTP服务器发Internet邮件:

  在TCP/IP网络中,常见的三种主机名解析方法是:DNS、NIS、etc/hosts,如果/etc/resolv.conf存在则先用DNS解析,如果要改变解析顺序,可以修改/etc/netsvc.conf 或变量NSORDER(其优先级高于/etc/netsvc.conf )如在/etc/netsvc.conf 中可定义hosts=local,nis,bind,也可设置NSORDER=local,nis

  1.有DNS的情况

  sendmail 缺省设置与DNS一起工作,不需要对/etc/sendmail.cf做任何修改,设置好/etc/resolv.conf并能连通DNS服务器,就可以发Internet邮件了。

  2.使用SMTP代理的情况

  SMTP的全称即为“简单邮件传输协议”,它负责邮件在两台服务器或客户端之间进行交换。习惯上,如果源服务器/客户端将邮件通过SMTP协议传送到其目标服务器上,我们将其称之为“投递”,否则称之为“中继”(RELAY)

  SMTP服务具有以下几个显著的特点:

  1.SMTP服务是匿名服务,并不要求确认发件人与收件人的真实身份;

  2.SMTP服务是明文服务,所有经过SMTP传输的内容均以明文传送。

  使用SMTP代理的情况下,需要对/etc/sendmail.cf做些修改,先要修改DS项,这是配置用来转发邮件的主机。格式如下:

  smtp主机的定义: DS

  DSsmtp xx.com.cn àsmtp的主机名

  或者

  DSsmtp:[xxx.xxx.xxx.xxx] àsmtp的IP地址

  本机的定义: Dw, Dm和Cw

  Sendmail 缺省自动定义 Dw (本机的主机名), Dm (域名) 和 Cw (主机别名) 。格式如下:

  Dwxxx //主机名紧挨着Dw写

  Dmcom.cn

  Cwlocalhost

  配置完毕后重起sendmail服务,然后可以用sendmail –d0.4查看域名的情况和sendmail版本情况,发送邮件可以用mail –v 显示详细的发送信息。

  如:mail –v test@xxx.com

  显示信息如下:

  test@xxx.com.cn... Connecting to [xxx.xxx.xxx.xxx] via smtp...

  220 xxx.com ESMTP

  >>> EHLO xxx.com.cn //发件人的名字就是:用户名@ xxx.com.cn

  250-xxx.com.cn

  250-AUTH LOGIN CRAM-MD5 PLAIN

  250-AUTH=LOGIN CRAM-MD5 PLAIN

  250-PIPELINING

  250 8BITMIME

  >>> MAIL From:<用户名@xxx.com.cn>

  250 ok

  >>> RCPT To:

  250 ok

  >>> DATA

  354 go ahead

  >>> . à结束符<回车><换行>.<回车><换行>

  250 ok 1024473751 qp 1714

  test@xxx.com.cn... Sent (ok 1024473751 qp 1714)

  Closing connection to [xxx.xxx.xxx.xxx]

  >>> QUIT

  221 xxx.com.cn

  其中>>>后面显示的内容可以手工输入,可以telnet xxx.xxx.xxx.xxx(SMTP代理主机名) 25,一步一步输入,测试整个邮件发送过程,找到故障原因所在。
posted @ 2007-12-21 14:48 pass4sure 阅读(151) | 评论 (0)编辑 收藏
 
posted @ 2007-11-08 18:00 pass4sure 阅读(127) | 评论 (0)编辑 收藏
 
波音777是有史以来第一架完全在电脑虚拟现实中设计制造的飞机,所用的设备完全由IBM公司所提供。   
  试飞前,波音公司的总裁非常热情的邀请IBM的技术主管去参加试飞,可那位主管却说道:“啊,非常荣幸,可惜那天是我妻子的生日,So......”   
  波音公司的总载一听就生气了:“胆小鬼,我还没告诉你试飞的日期呢!”。
posted @ 2007-10-22 11:47 pass4sure 阅读(111) | 评论 (0)编辑 收藏
 
 

1.310-879 HP0-417 310-035 920-140 You begin to boot a Sun Fire V1280 server, but realize some additional settings need to be checked. You decide to stop the boot and bring the system to the OK prompt. How can you accomplish this during the boot process?

 

A: Type ~..

B: Type break.

C: Go to the lom > prompt and type break.

D: Go to the lom > prompt and type reset -x.

Correct Answers: C

 

2.A00-211 1Y0-913 jn0-130 RF0-001 The customer wants to increase the number of CPUs on a Sun Fire 6800 domain. You add a second system board with an additional 4 CPUs to the domain. From the OS, what two commands can you run to confirm that the extra CPUs are configured and working? (Choose two.)

 

A:prstat

B:modinfo

C:psrinfo

D:psrdiag

E:prtdiag -v

Correct Answers: C, E

 

3. e20-320 IK0-002 190-513 sk0-002 190-533 You have installed SunMC server on a Sun Fire V440 and the agent on a Sun Fire V880 with all the default options. The snmpdx daemon is still running. You are not able to create an object for the Sun Fire V880 where SunMC agent is running. What should be your first two steps in resolving this problem? (Choose two.)

 

A:Stop the snmpdx daemon and disable it.

B:Check the network routing configuration.

C:Reconfigure SunMC server and agent to use a different port.

D:Reinstall the SunMC agent on the Sun Fire V880 with a different port number.

Correct Answers: A, C

 

4.e20-530 e20-533 e20-330 NS0-121 You are installing a used StorEdge 3310 SCSI array on a Sun Fire V480 server. You want to determine if the disks have updated firmware. Which command should you use to evaluate the firmware level?

 

A: fru stat

B: iostat -En

C: iostat -tcx

D: prtconf -pv

E: luxadm -e probe | grep version

F: luxadm display -v /dev/rdsk/cXtXdX

Correct Answers: B

 

5.310-015 310-202 9L0-611 220-302 You are hotswapping a power and cooling unit on a Sun StorEdge T3 array. The unit that is removed must be replaced within a specified amount of time or the array will automatically shut down and power off. How much time do you have to replace the unit?

 

A: 15 minutes

B: 30 minutes

C: 45 minutes

D: 60 minutes

Correct Answers: B

posted @ 2007-10-04 10:25 pass4sure 阅读(211) | 评论 (0)编辑 收藏
 
 

1. 70-210 Which of the following statements is true about expressions for calculated fields in Report Writer?

 

A: Calculated fields can only be used on Custom reports, not on primary and secondary copies of original reports.

B: A calculated field can only be used for calculations and can't be placed in the layout of a report.

C: Values must be placed in both the True and False case fields of a conditional expression.

D: A value should only be entered in the True case field of a conditional expression.

Correct Answers: C

 

2. 70-214 How many primary copies of an original report can be made in Report Writer?

 

A: 1

B: 2

C: 3

D: Unlimited

Correct Answers: A

 

3.  70-526 When the divider tool is placed in the body on a report layout, what restriction is made on the placement of new report fields?

 

A: Fields cannot be added to the body after the divider tool is placed.

B: Fields cannot be added to the right of the divider tool.

C: Fields cannot be added to the left of the divider tool.

D: Fields cannot be added to the body unless the grid is turned on.

Correct Answers: B

 

4. 70-216 How many branches of "1 to Many" relationships can you have when linking tables for a report?

 

A: 0

B: 1

C: 2

D: 5

Correct Answers: B

 

5. 70-270 Which table stores reports that have been modified in Report Writer?

 

A: Reports.dic

B: Dynamics.dic

C: Pathnames.doc

D: Dynamics.set

Correct Answers: A

 

6. 70-290 Which of the following is an advantage of creating a "1 to 1" relationship rather than a "1 to Many" relationship?

 

A: No advantages exist

B: User defined sorts become possible

C: Data from both tables can be placed on a report layout

D: Most linking restrictions only apply to 1 to Many relationships

Correct Answers: D

 

7. 70-306 Which of the following tools are available on a text report?

 

A:Divider Tool

B:Arrow Tool

C:Picture Tool

D:Line Tool

Correct Answers: A, B

 

8. 70-315 What function and operator are used to remove extra spacing between fields and then join the fields together on a report? (i.e. city, state, zip)

 

A:UCASE

B:STRIP

C:CONDENSE

D:CAT

Correct Answers: B, D

 

9.70-320 What function can help align fields that are placed in the report layout?

 

A: Sort

B: Grid

C: Linking

D: Body

Correct Answers: B

 

10.70-292 Which of the following expression types are supported for creating user defined fields with Report Writer?

 

A:Boolean

B:Fractional

C:Calculated

D:Conditional

Correct Answers: C, D

posted @ 2007-09-06 17:29 pass4sure 阅读(159) | 评论 (0)编辑 收藏
 

1.MS SCRIPT ENCODE
基本上没什么用了,一段JS就可以破解

2.封装成DLL
比较可行的方法,有通过VB封装成DLL的例子,而且无需改动很多代码,修改方便,调用时也很简单.缺点是需要注册DLL控件,虚拟主机通常不能达到这一要求.

封装时可在代码里加入主机域名判断的代码,不对则拒绝运行,不过提倡封装类,而展现逻辑还是留在ASP文件里吧,呵呵

案例:动易CMS

不过VB属于解释型语言,似乎可以反编译

3.使用NETBOX
国人开发的一款ASP服务器端程序,可以把ASP文件打包,缺陷是部分ASP函数不支持并且内存中仍有ASP源代码.

案例:麦秀(以NETBOX为平台,并非未加密ASP)

其实呢,不公开程序就OK了,但小人依然会设法潜入你的服务器去盗取程序代码.(参考sm*rtipb站长入侵ipbcn服务器事件.)

posted @ 2007-09-04 16:14 pass4sure 阅读(237) | 评论 (0)编辑 收藏
仅列出标题
共2页: 1 2