歡迎您光臨本站 註冊首頁

qmail-scanner-pl+EXTmail1.1.0出現問題

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

qmail-scanner-pl+EXTmail1.1.0出現問題

環境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:
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:
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="Policy: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或者自己寫一個,可以做成企業級郵件系統。

[ 本帖最後由 yihua2000 於 2009-8-27 17:12 編輯 ]

[火星人 ] qmail-scanner-pl+EXTmail1.1.0出現問題已經有451次圍觀

http://coctec.com/docs/service/show-post-21016.html