|
环境FC11+qmail1.06+vpopmail5.4.27+extmail1.1.0+qmail-scanner-queue.pl(2.0.6)+clamav0.95.2
原qmail-queue测试没有问题(也就是信体不能显示的问题)
信体不能显示:
compose.pm,我在1037行加了一个\n,
print FD "Content-Transfer-Encoding: base64\n\n";
print FD "\n";
===============但是不知道怎么回事正文就显示了一个换行
Content-Transfer-Encoding: base64
YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWE=
=========================================================================
系统加入qmail-scanner+clam
qmail-scanner-queue.pl配置
./configure --spooldir /var/spool/qscan --qmaildir /var/qmail --bindir /var/qmail/bin --qmail-queue-binary /var/qmail/bin/qmail-queue --admin postmaster --domain test.com --admin-description "System Anti-Virus Administrator" --notify admin,nmladm,nmlvadm,psender,recips,precips --local-domains test.com --max-scan-size 100000000 --silent-viruses auto --sa-timeout 30 --sa-faulttolerant 0 --sa-maxsize 256000 --sa-quarantine 0 --quarantine-reject 0 --lang en_GB --debug yes --unzip 1 --max-zip-size 1000000000 --add-dscr-hdrs yes --normalize yes --archive 0 --redundant yes --skip-text-msgs 1 --log-details syslog --log-crypto 0 --fix-mime 2 --ignore-eol-check 1 --scanners "clamscan,verbose_spamassassin" --install 1
===================================================================================================
clam默认。
qmail-scanner2.0.6/contrib/test_installation.sh -doit 成功发送。检测出邮件。
vi tcp.smtp
127.0.0.1:allow,RELAYCLIENT="",QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
:allow,QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
都通过qmail-scanner-queue.pl扫描。
发送出现问题。系统返回邮件全文如下:
Attention: yihua2000@test.com
A policy-violation was found in an Email message you sent.
This Email scanner intercepted it and stopped the entire message
reaching its destination.
The policy-violation was reported to be:
Disallowed breakage found in header name - not a valid email
Please contact your IT support personnel with any queries regarding this
policy.
Your message was sent with the following envelope:
MAIL FROM: yihua2000@test.com
RCPT TO: yihua2000@test.com
... and with the following headers:
---
MAILFROM: yihua2000@test.com
RCPTTO: yihua2000@test.com
IP-Addr: 127.0.0.1
Received: from unknown (HELO localhost.localdomain) (127.0.0.1)
by jnyzh.cn with SMTP; 26 Aug 2009 17:08:08 -0000
From: "=?GB2312?B?eWlodWEyMDAw?=" <yihua2000@test.com>
To: "=?GB2312?B?eWlodWEyMDAw?=" <yihua2000@test.com>
Subject: =?GB2312?B?suLK1DI=?=
Date: Thu, 27 Aug 2009 01:08:07 +0800
Mime-version: 1.0
X-Originating-Ip: [192.168.1.2]
X-Mailer: ExtMail 1.1.0
Content-Type: text/html; charset="GB2312"
Content-Transfer-Encoding: base64
PFA+suLK1KGjPC9QPg==
---
=============================================================
第二测试
Attention: yihua2000@test.com
A policy-violation was found in an Email message you sent.
This Email scanner intercepted it and stopped the entire message
reaching its destination.
The policy-violation was reported to be:
Disallowed breakage found in header name - not a valid email
Please contact your IT support personnel with any queries regarding this
policy.
Your message was sent with the following envelope:
MAIL FROM: yihua2000@test.com
RCPT TO: yihua2000@test.com
... and with the following headers:
---
MAILFROM: yihua2000@test.com
RCPTTO: yihua2000@test.com
IP-Addr: 127.0.0.1
Received: from unknown (HELO localhost.localdomain) (127.0.0.1)
by jnyzh.cn with SMTP; 26 Aug 2009 19:19:20 -0000
From: "=?ISO-8859-1?B?eWlodWEyMDAw?=" <yihua2000@test.com>
To: "=?ISO-8859-1?B?eWlodWEyMDAw?=" <yihua2000@test.com>
Subject: =?ISO-8859-1?B?aGFvIA==?=
Date: Thu, 27 Aug 2009 03:19:20 +0800
Mime-version: 1.0
X-Originating-Ip: [192.168.1.2]
X-Mailer: ExtMail 1.1.0
Content-Type: multipart/mixed; charset="ISO-8859-1";
boundary="=_66_5633_1251314360"
Content-Transfer-Encoding: base64
This is a MIME-formatted message. If you see this text it means that your
mail software cannot handle MIME-formatted messages.
---
====================================================================================
qmail-scanner-queue.pl相关源码如下(line646):
if (!$quarantine_event && $BAD_MIME_CHECKS && ($headers{'mime-version'} ne "") && !/^([^\s]+).*)$/) {
#Wow - a header (not header+value) that goes onto another line - not likely!
$illegal_mime=1;
$destring='problem';
$quarantine_description="Disallowed breakage found in header name - not a valid email";
$quarantine_event="olicy:Bad_MIME_Break";
$description .= "\n---perlscanner results ---\n$destring '$quarantine_description' found in message";
&debug("w_c: disallowed breakage found in header name ($_) - not valid email");
#next;
} else {
/^([^\s]+).*)$/;
$hdr=$1;
$last_hdr=tolower($hdr);
=================应该是文件头检测出现点问题,大家看看是否还要修改compose.pm,或者本身就是qmail-scanner-queue.pl代码有问题。
另外有谁知道上述代码具体含义的说一下。不甚感谢~~~~~~~~·正想做邮件病毒过滤和反垃圾邮件系统。
注:原cpmpose.pm下不带附件也会出错,加\n后在带附件的情况下出错~
extmail做webmail很不错,特别是现在支持了vpopmail,extman现在看来只能用于postfix了,在qmail下可以用qmailadmin代替,注册程序么可以用vqregister或者自己写一个,可以做成企业级邮件系统。 |
|