ubuntu-qmail安装配置详解(step by step)(4)

邮件已经可以正常收发了,我们再接再厉,安装反垃圾邮件系统和杀毒系统

1、安装反垃圾邮件系统

root@ubuntu-sdp:/usr/tmp#cpan


cpan[1]>install Mail::SpamAssassin

最后会提示错误,因为有些模块没有安装

再依次安装


REQUIRED module missing: Net::DNS
REQUIRED module missing: NetAddr::IP
optional module missing: Digest::SHA1
optional module missing: Mail::SPF
optional module missing: IP::Country
optional module missing: Razor2
optional module missing: Net::Ident
optional module missing: IO::Socket::INET6
optional module missing: IO::Socket::SSL
optional module missing: Mail::DKIM
optional module missing: Encode::Detect

warning: some functionality may not be available,
please read the above report before continuing!

Warning (usually harmless): 'YAML' not installed, will not store persistent state
  JMASON/Mail-SpamAssassin-3.3.0.tar.gz
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- NO Makefile created
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install
Could not read '/root/.cpan/build/Mail-SpamAssassin-3.3.0-Zofa2l/META.yml'. Falling back to other methods to determine prerequisites
Failed during this command:
 JMASON/Mail-SpamAssassin-3.3.0.tar.gz        : writemakefile NO -- No Makefile created

 

 

在以下安装过程,所有问题一律回车

cpan[2]>install Net::DNS

cpan[4]> install NetAddr::IP

cpan[1]> install Digest::SHA

 

cpan[2]> install Mail::SPF

cpan[3]> install IP::Country

cpan[4]> install Razor2

cpan[5]> install Net::Ident

cpan[5]> install IO::Socket::INET6


cpan[8]> install IO::Socket::SSL

cpan[8]> install Mail::DKIM

cpan[8]> install Encode::Detect

root@ubuntu-sdp:/usr/tmp# wget http://apache.etoak.com/spamassassin/source/Mail-SpamAssassin-3.3.0.tar.gz
--2010-02-13 19:03:21--  http://apache.etoak.com/spamassassin/source/Mail-SpamAssassin-3.3.0.tar.gz
Resolving apache.etoak.com... 123.232.99.197
Connecting to apache.etoak.com|123.232.99.197|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1322429 (1.3M) [application/x-gzip]
Saving to: `Mail-SpamAssassin-3.3.0.tar.gz.1'

100%[===================================================================================>] 1,322,429    183K/s   in 7.2s   

2010-02-13 19:03:29 (179 KB/s) - `Mail-SpamAssassin-3.3.0.tar.gz.1' saved [1322429/1322429]

root@ubuntu-sdp:/usr/tmp# tar xvfz Mail-SpamAssassin-3.3.0.tar.gz

root@ubuntu-sdp:/usr/tmp# cd Mail-SpamAssassin-3.3.0

root@ubuntu-sdp:/usr/tmp/Mail-SpamAssassin-3.3.0# perl Makefile.PL
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]

NOTE: settings for "make test" are now controlled using "t/config.dist".
See that file if you wish to customise what tests are run, and how.

checking module dependencies and their versions...

***************************************************************************
NOTE: the optional Razor2 module is not installed,
minimum required version is 2.61.

  Used to check message signatures against Vipul's Razor collaborative
  filtering network. Razor has a large number of dependencies on CPAN
  modules. Feel free to skip installing it, if this makes you nervous;
  SpamAssassin will still work well without it.

  More info on installing and using Razor can be found
  at http://wiki.apache.org/spamassassin/InstallingRazor .


***************************************************************************
NOTE: the optional Net::Ident module is not installed.

  If you plan to use the --auth-ident option to spamd, you will need
  to install this module.


***************************************************************************
NOTE: the optional IO::Socket::SSL module is not installed.

  If you wish to use SSL encryption to communicate between spamc and
  spamd (the --ssl option to spamd), you need to install this
  module. (You will need the OpenSSL libraries and use the
  ENABLE_SSL="yes" argument to Makefile.PL to build and run an SSL
  compatibile spamc.)


***************************************************************************
NOTE: the optional Mail::DKIM module is not installed,
minimum required version is 0.31, recommended version is 0.37 or higher.

  If this module is installed and the DKIM plugin is enabled,
  SpamAssassin will perform DKIM signature verification when DKIM-Signature
  header fields are present in the message headers, and check ADSP rules
  (e.g. anti-phishing) when a mail message does not contain a valid author
  domain signature. Version 0.37 or later is needed to fully support ADSP.

optional module missing: Razor2
optional module missing: Net::Ident
optional module missing: IO::Socket::SSL
optional module missing: Mail::DKIM

warning: some functionality may not be available,
please read the above report before continuing!

Checking if your kit is complete...
Looks good
Warning: prerequisite Mail::DKIM 0.31 not found.
Writing Makefile for Mail::SpamAssassin
Makefile written by ExtUtils::MakeMaker 6.42

root@ubuntu-sdp:/usr/tmp/Mail-SpamAssassin-3.3.0#make

root@ubuntu-sdp:/usr/tmp/Mail-SpamAssassin-3.3.0#make install

root@ubuntu-sdp:/usr/local/bin#cd /usr/local/bin

root@ubuntu-sdp:/usr/local/bin# sa-update

root@ubuntu-sdp:/usr/local/bin# nano /etc/init.d/spamd

  GNU nano 2.0.9                          File: /etc/init.d/spamd                                                           

#!/bin/sh
/usr/local/bin/spamd &

然后将/etc/init.d/spamd加入自启动名单中(使用rcconf,这一步不详述了)

可以先手工运行

root@ubuntu-sdp:/usr/local/bin# spamd &

安装杀毒系统

root@ubuntu-sdp:/usr/tmp# wget http://nchc.dl.sourceforge.net/project/clamav/clamav/0.95.3/clamav-0.95.3.tar.gz

root@ubuntu-sdp:/usr/tmp#tar xvfz clamav-0.95.3.tar.gz

root@ubuntu-sdp:/usr/tmp#cd clamav-0.95.3

root@ubuntu-sdp:/usr/tmp#useradd -s /bin/false clamav

root@ubuntu-sdp:/usr/tmp#./configure --prefix=/usr/local/clamav

root@ubuntu-sdp:/usr/tmp#make

root@ubuntu-sdp:/usr/tmp#make install

安装qmail-scanner

root@ubuntu-sdp:/usr/tmp# wget http://downloads.sourceforge.net/project/qmail-scanner/qmail-scanner/2.08/qmail-scanner-2.08.tgz?use_mirror=nchc
--2010-02-12 09:12:27--  http://downloads.sourceforge.net/project/qmail-scanner/qmail-scanner/2.08/qmail-scanner-2.08.tgz?use_mirror=nchc
Resolving downloads.sourceforge.net... 216.34.181.59
Connecting to downloads.sourceforge.net|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://nchc.dl.sourceforge.net/project/qmail-scanner/qmail-scanner/2.08/qmail-scanner-2.08.tgz [following]
--2010-02-12 09:12:28--  http://nchc.dl.sourceforge.net/project/qmail-scanner/qmail-scanner/2.08/qmail-scanner-2.08.tgz
Resolving nchc.dl.sourceforge.net... 211.79.60.17
Connecting to nchc.dl.sourceforge.net|211.79.60.17|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 239667 (234K) [application/x-gzip]
Saving to: `qmail-scanner-2.08.tgz'

100%[===================================================================================>] 239,667     77.3K/s   in 3.0s   

2010-02-12 09:12:32 (77.3 KB/s) - `qmail-scanner-2.08.tgz' saved [239667/239667]


root@ubuntu-sdp:/usr/tmp# useradd -s /bin/false qscand

root@ubuntu-sdp:/usr/tmp# tar xvfz qmail-scanner-2.08.tgz

root@ubuntu-sdp:/usr/tmp# cd qmail-scanner-2.08

安装maildrop

 root@ubuntu-sdp:/home/deepfuture# cd /usr/tmp

root@ubuntu-sdp:/usr/tmp# wget https://sourceforge.net/projects/courier/files/maildrop/2.4.0/maildrop-2.4.0.tar.bz2/download
--2010-02-13 22:29:56--  https://sourceforge.net/projects/courier/files/maildrop/2.4.0/maildrop-2.4.0.tar.bz2/download
Resolving sourceforge.net... 216.34.181.60
Connecting to sourceforge.net|216.34.181.60|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://sourceforge.net/projects/courier/files/maildrop/2.4.0/maildrop-2.4.0.tar.bz2/download [following]
--2010-02-13 22:29:58--  http://sourceforge.net/projects/courier/files/maildrop/2.4.0/maildrop-2.4.0.tar.bz2/download
Connecting to sourceforge.net|216.34.181.60|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://downloads.sourceforge.net/project/courier/maildrop/2.4.0/maildrop-2.4.0.tar.bz2?use_mirror=nchc [following]
--2010-02-13 22:29:59--  http://downloads.sourceforge.net/project/courier/maildrop/2.4.0/maildrop-2.4.0.tar.bz2?use_mirror=nchc
Resolving downloads.sourceforge.net... 216.34.181.59
Connecting to downloads.sourceforge.net|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://nchc.dl.sourceforge.net/project/courier/maildrop/2.4.0/maildrop-2.4.0.tar.bz2 [following]
--2010-02-13 22:30:00--  http://nchc.dl.sourceforge.net/project/courier/maildrop/2.4.0/maildrop-2.4.0.tar.bz2
Resolving nchc.dl.sourceforge.net... 211.79.60.17
Connecting to nchc.dl.sourceforge.net|211.79.60.17|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2415851 (2.3M) [application/x-bzip2]
Saving to: `maildrop-2.4.0.tar.bz2'

100%[===================================================================================>] 2,415,851    212K/s   in 11s    

2010-02-13 22:30:12 (205 KB/s) - `maildrop-2.4.0.tar.bz2' saved [2415851/2415851]

root@ubuntu-sdp:/usr/tmp# tar xvfj maildrop-2.4.0.tar.bz2

root@ubuntu-sdp:/usr/tmp/maildrop-2.4.0# apt-get install g++ libpcre3-dev

root@ubuntu-sdp:/usr/tmp/maildrop-2.4.0# groupadd maildrop
root@ubuntu-sdp:/usr/tmp/maildrop-2.4.0# useradd -g maildrop maildrop
root@ubuntu-sdp:/usr/tmp/maildrop-2.4.0#

 

unziproot@ubuntu-sdp:/usr/tmp/maildrop-2.4.0# groupadd maildrop
root@ubuntu-sdp:/usr/tmp/maildrop-2.4.0# useradd -g maildrop maildrop
root@ubuntu-sdp:/usr/tmp/maildrop-2.4.0# id maildrop
uid=1011(maildrop) gid=1012(maildrop) groups=1012(maildrop)
root@ubuntu-sdp:/usr/tmp/maildrop-2.4.0# ./configure --enable-maildrop-uid=1011 --enable-maildrop-gid=1012  --enable-trusted-users='root qmaild maildrop'

root@ubuntu-sdp:/usr/tmp/maildrop-2.4.0# make

root@ubuntu-sdp:/usr/tmp/maildrop-2.4.0# make install

root@ubuntu-sdp:/usr/tmp/maildrop-2.4.0# chmod 4755 /usr/local/bin/maildrop

root@ubuntu-sdp:/usr/tmp/maildrop-2.4.0# cd /var/vpopmail/domains/deepfuture.imwork.net

root@ubuntu-sdp:/var/vpopmail/domains/deepfuture.imwork.net# nano ./mailfilter

  GNU nano 2.0.9                            File: ./mailfilter                                                              

VHOME='/var/vpopmail/bin/vuserinfo -d $EXT@$Host'
to "$VHOME/Maildir"

root@ubuntu-sdp:/var/vpopmail/domains/deepfuture.imwork.net# nano .qmail-default

  GNU nano 2.0.9                           File: .qmail-default                                                             

| /var/vpopmail/bin/vdelivermail '' bounce-no-mailbox
|/usr/local/bin/maildrop ./.mailfilter

 

 安装unzip

root@ubuntu-sdp:/home/deepfuture# apt-get install unzip
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
建议安装的软件包:
  zip
下列【新】软件包将被安装:
  unzip
共升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 34 个软件未被升级。
需要下载 0B/181kB 的软件包。
解压缩后会消耗掉 406kB 的额外空间。
选中了曾被取消选择的软件包 unzip。
(正在读取数据库 ... 系统当前总共安装有 62665 个文件和目录。)
正在解压缩 unzip (从 .../archives/unzip_6.0-1_i386.deb) ...
正在处理用于 man-db 的触发器...
正在设置 unzip (6.0-1) ...

安装perl-suid

 root@ubuntu-sdp:/usr/tmp/qmail-scanner-2.08# apt-get install perl-suid
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
将会安装下列额外的软件包:
  libperl5.10
下列【新】软件包将被安装:
  libperl5.10 perl-suid
共升级了 0 个软件包,新安装了 2 个软件包,要卸载 0 个软件包,有 32 个软件未被升级。
需要下载 684kB 的软件包。
解压缩后会消耗掉 1,593kB 的额外空间。
您希望继续执行吗?[Y/n]y

 安装程序需要damontools中的setuidgid这个程序,因为我们的damontools是手工安装的,所以拷贝这个东东过来
root@ubuntu-sdp:/usr/bin# cp /var/daemontool/command/setuidgid /usr/bin/setuidgid

root@ubuntu-sdp:/usr/bin# cd /usr/tmp/qmail-scanner-2.08加到/etc/enviroment

先手工增加,最好把这个/usr/local/clamav/bin加到/etc/environment中的PATH

root@ubuntu-sdp:/usr/tmp/qmail-scanner-2.08# export PATH=$PATH:/usr/local/clamav/bin

 

deepfuture@ubuntu-sdp:/usr/tmp/qmail-scanner-2.08$ sudo su

root@ubuntu-sdp:/usr/tmp/qmail-scanner-2.08# cd /var/vpopmail/domains/deepfuture.imwork.net

 root@ubuntu-sdp:/var/vpopmail/domains/deepfuture.imwork.net# nano /var/daemontool/service/qmail-send/run

  GNU nano 2.0.9                   File: /var/daemontool/service/qmail-send/run                                             

#!/bin/sh
export PATH=$PATH:/var/qmail/bin:/usr/local/clamav/bin
export QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
qmail-start "`cat /var/qmail/control/mydelivery`"

 root@ubuntu-sdp:/var/vpopmail/domains/deepfuture.imwork.net# nano /etc/tcp.smtp

  GNU nano 2.0.9                            File: /etc/tcp.smtp                                                             

127.0.0.1:allow,RELAYCLIENT="",RBLSMTPD=""

:allow,RBLSMTPD="",QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"

 root@ubuntu-sdp:/var/vpopmail/domains/deepfuture.imwork.net# tcprules /etc/tcp.smtp.cdb /tmp/tcp.smtp < /etc/tcp.smtp

 

安装qmail-scanner

 

 


root@ubuntu-sdp:/home/deepfuture# nano /etc/environment

  GNU nano 2.0.9                           File: /etc/environment                                                           

 

 

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/java-6-sun/jre/bin:/usr/lib/jvm/j$
JAVA_HOME=/usr/lib/jvm/java-6-sun
JRE_HOME=/usr/lib/jvm/java-6-sun/jre
CLASSPATH=.:/usr/lib/jvm/java-6-sun/lib
LC_ALL="zh_CN.UTF-8"

root@ubuntu-sdp:/home/deepfuture# locale
LANG=zh_CN.UTF-8
LANGUAGE=zh_CN:zh
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=zh_CN.UTF-8

保证LC_ALL不为空,否则可以先手工增加 一下

export LC_ALL="zh_CN.UTF-8"

开始安装

root@ubuntu-sdp:/usr/tmp/qmail-scanner-2.08# spamd &
[1] 2261
root@ubuntu-sdp:/usr/tmp/qmail-scanner-2.08#  ./configure --local-domains "deepfuture.imwork.net" --install
Building Qmail-Scanner 2.08...


                ***** NOTE ******

Qmail-Scanner doesn't have language translations for zh_CN.UTF-8,
- so defaulting to english...

[Hit <RETURN> to continue]

 

This script will search your system for the virus scanners it knows
about, and will ensure that all external programs
qmail-scanner-queue.pl uses are explicitly pathed for performance
reasons.

Continue? ([Y]/N)

 2月 14 15:06:29.210 [2261] info: spamd: server started on port 783/tcp (running version 3.3.0)
 2月 14 15:06:29.211 [2261] info: spamd: server pid: 2261
 2月 14 15:06:29.232 [2261] info: spamd: server successfully spawned child process, pid 2442
 2月 14 15:06:29.241 [2261] info: spamd: server successfully spawned child process, pid 2443
 2月 14 15:06:29.255 [2442] info: spamd: connection from localhost [127.0.0.1] at port 49938
 2月 14 15:06:29.260 [2261] info: prefork: child states: BI
 2月 14 15:06:29.301 [2442] info: spamd: setuid to qscand succeeded
 2月 14 15:06:29.323 [2442] info: spamd: processing message <[email protected]> for qscand:1010
 2月 14 15:06:29.818 [2442] warn: plugin: eval failed: bayes: (in learn) locker: safe_lock: cannot create tmp lockfile /home/qscand/.spamassassin/bayes.lock.ubuntu-sdp.2442 for /home/qscand/.spamassassin/bayes.lock: No such file or directory
 2月 14 15:06:29.834 [2442] info: spamd: clean message (-0.0/5.0) for qscand:1010 in 0.6 seconds, 394 bytes.
 2月 14 15:06:29.852 [2442] info: spamd: result: . 0 - NO_RECEIVED,NO_RELAYS scantime=0.6,size=394,user=qscand,uid=1010,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=49938,mid=<[email protected]>,autolearn=unavailable
 2月 14 15:06:29.882 [2443] info: spamd: connection from localhost [127.0.0.1] at port 49939
 2月 14 15:06:29.906 [2443] info: spamd: setuid to qscand succeeded
 2月 14 15:06:29.945 [2443] info: spamd: processing message <[email protected]> for qscand:1010
 2月 14 15:06:30.226 [2261] info: prefork: child states: IB
 2月 14 15:06:30.288 [2443] warn: plugin: eval failed: bayes: (in learn) locker: safe_lock: cannot create tmp lockfile /home/qscand/.spamassassin/bayes.lock.ubuntu-sdp.2443 for /home/qscand/.spamassassin/bayes.lock: No such file or directory
 2月 14 15:06:30.310 [2443] info: spamd: clean message (-0.0/5.0) for qscand:1010 in 0.4 seconds, 394 bytes.
 2月 14 15:06:30.312 [2443] info: spamd: result: . 0 - NO_RECEIVED,NO_RELAYS scantime=0.4,size=394,user=qscand,uid=1010,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=49939,mid=<[email protected]>,autolearn=unavailable
 2月 14 15:06:30.426 [2442] info: spamd: connection from localhost [127.0.0.1] at port 49940
 2月 14 15:06:30.440 [2442] info: spamd: setuid to qscand succeeded
 2月 14 15:06:30.453 [2442] info: spamd: processing message <[email protected]> for qscand:1010
 2月 14 15:06:30.653 [2261] info: prefork: child states: BI
 2月 14 15:06:30.758 [2442] info: spamd: identified spam (1000.0/5.0) for qscand:1010 in 0.3 seconds, 799 bytes.
 2月 14 15:06:30.760 [2442] info: spamd: result: Y 999 - GTUBE,NO_RECEIVED,NO_RELAYS scantime=0.3,size=799,user=qscand,uid=1010,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=49940,mid=<[email protected]>,autolearn=no
 2月 14 15:06:30.809 [2443] info: spamd: connection from localhost [127.0.0.1] at port 49941
 2月 14 15:06:30.832 [2443] info: spamd: setuid to qscand succeeded
 2月 14 15:06:30.837 [2443] info: spamd: checking message <[email protected]> for qscand:1010
 2月 14 15:06:31.129 [2261] info: prefork: child states: IB
 2月 14 15:06:31.152 [2443] info: spamd: identified spam (1000.0/5.0) for qscand:1010 in 0.3 seconds, 799 bytes.
 2月 14 15:06:31.156 [2443] info: spamd: result: Y 999 - GTUBE,NO_RECEIVED,NO_RELAYS scantime=0.3,size=799,user=qscand,uid=1010,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=49941,mid=<[email protected]>,autolearn=no
 2月 14 15:06:31.532 [2261] info: prefork: child states: II

The following binaries and scanners were found on your system:

mimeunpacker=/usr/local/bin/reformime

Content/Virus Scanners installed on your System

max-scan-size=100000000
clamdscan=/usr/local/clamav/bin/clamdscan (which means clamscan won't be used as clamdscan is better)
fast_spamassassin=/usr/local/bin/spamc

Qmail-Scanner details.

log-details=syslog
log-crypto=0
fix-mime=2
ignore-eol-check=0
debug=1
notify=psender,nmlvadm
redundant-scanning=yes
sa-tempfail=1
sa-faulttolerant=1
sa-maxsize=256000
virus-admin=System Anti-Virus Administrator <root@ubuntu-sdp>
local-domains='ubuntu-sdp','deepfuture.imwork.net'
silent-viruses='klez','bugbear','hybris','yaha','braid','nimda','tanatos','sobig','winevar','palyh','fizzer','gibe','cailont','lovelorn','swen','dumaru','sober','hawawi','holar-i','mimail','poffer','bagle','worm.galil','mydoom','worm.sco','tanx','novarg','\@mm'
scanners="clamdscan","fast_spamassassin"

If that looks correct, I will now generate qmail-scanner-queue.pl
for your system...
Continue? ([Y]/N)

Testing suid nature of /usr/bin/perl...
Looks OK...
Hit RETURN to create initial directory structure under /var/spool/qscan,
and install qmail-scanner-queue.pl under /var/qmail/bin:
perlscanner: generate new DB file from /var/spool/qscan/quarantine-events.txt
perlscanner: total of 12 entries.

Finished installation of initial directory structure for Qmail-Scanner
under /var/spool/qscan and qmail-scanner-queue.pl under /var/qmail/bin.

Finished. Please read README(.html) and then go over the script
(/var/qmail/bin/qmail-scanner-queue.pl) to check paths/etc.

"/var/qmail/bin/qmail-scanner-queue.pl -r" should return some well-known virus
definitions to show that the internal perlscanner component is working.

That's it!

 

              ****** FINAL TEST ******

Please log into an unpriviledged account and run
/var/qmail/bin/qmail-scanner-queue.pl -g

If you see the error "Can't do setuid", or "Permission denied", then 
refer to the FAQ.

(e.g.  "setuidgid qmaild /var/qmail/bin/qmail-scanner-queue.pl -g")


That's it! To report success:

   % (echo 'First M. Last'; cat SYSDEF)|mail [email protected]
Replace First M. Last with your name.
root@ubuntu-sdp:/usr/tmp/qmail-scanner-2.08#

测试一下:

 root@ubuntu-sdp:/usr/tmp/qmail-scanner-2.08# /var/qmail/bin/qmail-scanner-queue.pl -g
perlscanner: generate new DB file from /var/spool/qscan/quarantine-events.txt
perlscanner: total of 12 entries.
root@ubuntu-sdp:/usr/tmp/qmail-scanner-2.08# /var/qmail/bin/qmail-scanner-queue.pl -z
root@ubuntu-sdp:/usr/tmp/qmail-scanner-2.08#

 启动daemontool
root@ubuntu-sdp:/usr/tmp/qmail-scanner-2.08#  /var/daemontool/command/svscanboot &
[1] 1460

最后用foxmail测试一下


ubuntu-qmail安装配置详解(step by step)(4)_第1张图片
 


ubuntu-qmail安装配置详解(step by step)(4)_第2张图片
 


ubuntu-qmail安装配置详解(step by step)(4)_第3张图片
 


ubuntu-qmail安装配置详解(step by step)(4)_第4张图片
 

 

你可能感兴趣的:(.net,socket,ubuntu,软件测试,perl)