ORF反垃圾邮件系统

邮件服务器-邮件系统-邮件技术论坛(BBS)

 找回密码
 会员注册
查看: 3525|回复: 4

qmail-scanner 测试,qmailqueue was not set!!

[复制链接]
发表于 2005-1-19 10:20:05 | 显示全部楼层 |阅读模式
QMAILQUEUE was not set, defaulting to /var/qmail/bin/qmail-scanner-queue.pl for this test... <br>
<br>
Sending standard test message - no viruses... <br>
done! <br>
<br>
Sending eicar test virus - should be caught by perlscanner module... <br>
done! <br>
<br>
Sending eicar test virus with altered filename - should only be caught by commercial anti-virus modules (if you have any)... <br>
<br>
Sending bad spam message for anti-spam testing - In case you are using SpamAssassin... <br>
Done! <br>
<br>
Finished test. Now go and check Email for postmaster@xxx.com <br>
<br>
以上是测试信息正常。 <br>
 /var/spool/qmailscan/quarantine.log <br>
/var/spool/qmailscan/qmail-queue.log <br>
有相关正常日志。/var/log/clamd.log没有记录 <br>
用其它用户发邮件时,相关日志都没有记录!!好像是没有工作哟? <br>
<br>
是什么原因呢? 多谢!QMAILQUEUE no set ?是什么问题呀<br>
各位仁兄,有何良策呀多谢!! <br>
<br>
是qmailqueue 补丁的问题?不过我安装是可是打了qmailqueue了呀! <br>
<br>
这个问题晕了我两天了,多谢!
发表于 2005-1-29 21:03:38 | 显示全部楼层

re:现在还在维持这种状况吗?奇怪的问题哦,哈...

现在还在维持这种状况吗?奇怪的问题哦,哈哈。。<br>
我帮你查查。。。
发表于 2005-3-6 21:49:53 | 显示全部楼层

re:tar zxvf qmail-scann...

tar zxvf qmail-scanner-1.24.tgz<br>
<br>
Now unpack qms-analog...<br>
<br>
tar zxvf qms-analog-0.4.1.tar.gz<br>
<br>
Install qms-analog itself. This will come in handy in the next step when we install Qmailanalog.<br>
<br>
cd qms-analog-0.4.1<br>
<br>
make all<br>
<br>
Next, we copy needed qms-analog files to the qmail-scanner source directory...<br>
<br>
cp qmail-scanner-1.24-st-qms-YYYYMMDD.patch /downloads/qmailrocks/qmail-scanner-1.24/<br>
<br>
Now, let's apply the qms-analog patch...<br>
<br>
cd /downloads/qmailrocks/qmail-scanner-1.24<br>
<br>
patch -p1 < qmail-scanner-1.24-st-qms-YYYYMMDD.patch<br>
<br>
Now we will configure qmail-scanner and install it. Ordinarily, you would run the ./configure script to configure and install qmail-scanner. However, Mark Teel has donated a handy little config script that does most of the work for you.This script is called "qms-config-script" and, if you look above, you should have already copied this config script into the qmail-scanner source directory.<br>
<br>
How you go about configuring and installing qmail-scanner from this point on depends on how you server's installation of Perl is configured. For the purposes of this installation, there are 2 Perl setups.<br>
<br>
1. Perl is configured to allow for setuid functions.<br>
<br>
2. Perl is not configured for setuid functionality and, in fact, does not permit it.<br>
<br>
We'll start off with the configuration step for a server that allows setuid. However, if you run into setuid errors, you can jump to a set of instructions for servers that do not allow setuid functionality.<br>
<br>
So let's do it...<br>
<br>
First, you need to configure the script for your needs...<br>
<br>
cd /downloads/qmailrocks/qmail-scanner-1.24<br>
<br>
vi qms-config<br>
<br>
You will notice several fields that need to be customized to fit your needs. Let's have a look. I've highlighted the fields you should customize in RED<br>
<br>
#!/bin/sh<br>
<br>
if [ "$1" != "install" ]; then<br>
INSTALL=<br>
else<br>
INSTALL="--install"<br>
fi<br>
<br>
./configure --domain yourdomain.com \<br>
--admin postmaster \<br>
--local-domains "yourdomain.com,yourotherdomain.com" \<br>
--add-dscr-hdrs yes \<br>
--dscr-hdrs-text "X-Antivirus-MYDOMAIN" \<br>
--ignore-eol-check yes \<br>
--sa-quarantine 0 \<br>
--sa-delete 0 \<br>
--sa-reject no \<br>
--sa-subject ":SPAM:" \<br>
--sa-delta 0 \<br>
--sa-alt yes \<br>
--sa-debug no \<br>
--notify admin \<br>
"$INSTALL"<br>
<br>
Now save and exit out of the config file. That was easy, wasn't it.<br>
<br>
And now we will run a test config for qmail-scanner...<br>
<br>
chmod 755 qms-config<br>
<br>
./qms-config<br>
<br>
Answer YES to all questions. If you get no errors, you can then run the script in "install" mode and this will install qmail-scanner on your server.<br>
<br>
If the config test produced any error messages, stop here!<br>
<br>
If you got a "setuid" related error when you ran the above script it is most likely due to you Perl installation not supporting setuid functionality. You can click here for alternate non-setuid configuration instructions.<br>
<br>
If you get any other errors, check out these troubleshooting tips.<br>
<br>
If you didn't get any errors on the test run above, then you should be ok to run the "real" installation script below. So let's do it...<br>
<br>
./qms-config install<br>
<br>
Again, answer YES to all questions. If you get no errors, you can then run the script in "install" mode and this will install qmail-scanner on your server. If you do get errors, check out these troubleshooting tips.<br>
<br>
And now all that's left for qmail-scanner is to initiate the version file and the perlscanner database...<br>
<br>
First, we'll initialize the version file. This command also helps to keep your server's /var/spool/qmailscan folder clear of rogue files that can develop when SMTP sessions are dropped. You may want to stick this command into your server's crontab and run it once a day. You'll see more on this in the "maintaining your qmail server" step near the end of this tutorial.. So let's run it...<br>
<br>
setuidgid qscand /var/qmail/bin/qmail-scanner-queue.pl -z<br>
<br>
And now we will generate a new perlscanner database for qmailp-scanner. For future reference, it's a good idea to run this next command whenever you upgrade qmail-scanner. You'll see more on this in the "maintaining your qmail server" step near the end of this tutorial. So let's do i t...<br>
<br>
setuidgid qscand /var/qmail/bin/qmail-scanner-queue.pl -g<br>
<br>
A successful database build should produce the following output:<br>
<br>
perlscanner: generate new DB file from /var/spool/qmailscan/quarantine-attachments.txt<br>
perlscanner: total of 9 entries.<br>
<br>
And now one final ownership check...<br>
<br>
chown -R qscand:qscand /var/spool/qmailscan<br>
<br>
Woohoo, qmail-scanner is installed! Now it's time to tie qmail-scanner into qmail itself.<br>
<br>
vi /var/qmail/supervise/qmail-smtpd/run<br>
<br>
To instruct Qmail to use Qmail-Scanner as the alternative queuing mechanism, we add the following line to the SMTP "run" script right under the first line (#!/bin/sh):<br>
<br>
QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl" export QMAILQUEUE<br>
<br>
..and we change the "softlimit" in that same script...<br>
<br>
change softlimit to 40000000<br>
<br>
Note: It is absolutely vital that you change the "Softlimit" setting in this script. If you don't, qmail may fail to deliver mail!!!<br>
<br>
So now the qmail-smtp/run file should look like this:<br>
<br>
#!/bin/sh<br>
QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl" export QMAILQUEUE<br>
QMAILDUID=`id -u vpopmail`<br>
NOFILESGID=`id -g vpopmail`<br>
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`<br>
LOCAL=`head -1 /var/qmail/control/me`<br>
if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z "$LOCAL" ]; then<br>
echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in<br>
echo /var/qmail/supervise/qmail-smtpd/run<br>
exit 1<br>
fi<br>
if [ ! -f /var/qmail/control/rcpthosts ]; then<br>
echo "No /var/qmail/control/rcpthosts!"<br>
echo "Refusing to start SMTP listener because it'll create an open relay"<br>
exit 1<br>
fi<br>
exec /usr/local/bin/softlimit -m 40000000 \<br>
/usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \<br>
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp \<br>
/var/qmail/bin/qmail-smtpd your_domain.com \<br>
/home/vpopmail/bin/vchkpw /usr/bin/true 2>&1<br>
<br>
Once you've got the qmail-smtpd file modified, save the changes and exit from the file. Now we will finalize the qmail-scanner installation by going over some post-install configuration options. After that, we'll fire everything up and take qmail-scanner for a test drive!
发表于 2005-3-6 21:50:35 | 显示全部楼层

re:To activate all the...

To activate all the changes we just made, we're going to have to completely stop and restart qmail.<br>
<br>
Stop it...<br>
<br>
qmailctl stop<br>
<br>
and start it...<br>
<br>
qmailctl start<br>
<br>
And a quick check of the qmail processes, just to be safe..<br>
<br>
qmailctl stat<br>
<br>
Now it's time to test the whole damn thing to see if Qmail-Scanner, Spamassassin and Clam AV are all working correctly. Fortunately, Qmail-Scanner comes with it's own testing script that does a fantastic job. So let's test it!<br>
<br>
cd /downloads/qmailrocks/qmail-scanner-1.24/contrib<br>
<br>
chmod 755 test_installation.sh<br>
<br>
./test_installation.sh -doit<br>
<br>
A successful test should produce the following output. 2 messages should be quarantined by Clam Antivirus in /var/spool/quarantine/new and 2 messages should be set to whatever mailbox you specified in the Qmail-scanner configuration script. Don't worry if you don't get virus notification emails. The normal notification emails that get sent out upon virus detection usually don't work during the test.<br>
<br>
setting QMAILQUEUE to /var/qmail/bin/qmail-scanner-queue.pl for this test...<br>
<br>
Sending standard test message - no viruses...<br>
done!<br>
<br>
Sending eicar test virus - should be caught by perlscanner module...<br>
done!<br>
<br>
Sending eicar test virus with altered filename - should only be caught by commercial anti-virus modules (if you have any)...<br>
<br>
Sending bad spam message for anti-spam testing - In case you are using SpamAssassin...<br>
Done!<br>
<br>
Finished test. Now go and check Email for postmaster@mydomain.com<br>
<br>
If you get 2 messages in your inbox and you see 2 messages in the quarantine folder, it's time to crack open a cold one! You've successfully installed all 3 packages! Woohoo!
发表于 2005-3-6 21:51:14 | 显示全部楼层

re:以上是我的做法

以上是我的做法
您需要登录后才可以回帖 登录 | 会员注册

本版积分规则

小黑屋|手机版|Archiver|邮件技术资讯网

GMT+8, 2024-3-29 14:49

Powered by Discuz! X3.2

© 2001-2016 Comsenz Inc.

本论坛为非盈利中立机构,所有言论属发表者个人意见,不代表本论坛立场。内容所涉及版权和法律相关事宜请参考各自所有者的条款。
如认定侵犯了您权利,请联系我们。本论坛原创内容请联系后再行转载并务必保留我站信息。此声明修改不另行通知,保留最终解释权。
*本论坛会员专属QQ群:邮件技术资讯网会员QQ群
*本论坛会员备用QQ群:邮件技术资讯网备用群

快速回复 返回顶部 返回列表