1 最后由 kouty (2013-10-28 11:32:07) 编辑

主题: spamassassin反垃圾邮件支持中文标题过滤不?

==== 必填信息。没有填写将不予回复 ====
- iRedMail 版本号:0.8.5
- 使用哪个数据库存储用户帐号(OpenLDAP,MySQL,PostgreSQL):OpenLDAP
- 使用的 Linux/BSD 发行版名称及版本号:CentOs6.4
- 与您的问题相关的日志信息:
====

如何自定义反垃圾邮件设置,比如设置标题为"免费推广"的垃圾邮件,我在mail.cf中设置header_checks,中文不起作用,英文可以拦截,好像header_checks中对中文输入不支持,iredmail还有哪个地方可以支持标题过滤的吗???spamAssassin支持的话,是否在
header LOCAL_DEMONSTRATION_SUBJECT  SUBJECT =~ /^.*免费推广.*/   

支持中文输入???我把这行的#删掉后,重启系统,在输入英文、中文都不起作用,连默认的/\btest\b/i 都不起作用,还要改哪么?

回复: spamassassin反垃圾邮件支持中文标题过滤不?

直接在 google 里搜索 "SpamAssassin 中文" 就可以找到答案。例如:

http://mail.mcjh.kl.edu.tw/~lin/compute … sassin.htm
http://blog.dspam.org.cn/post-30.html

3 最后由 kouty (2013-10-28 10:38:10) 编辑

回复: spamassassin反垃圾邮件支持中文标题过滤不?

谢谢,我成功了一晚上,结果第二天,又不成功了,日志中出现了以下错误:
Oct 28 06:14:53 www amavis[1771]: (01771-01) (!)run_av (ClamAV-clamd) FAILED - unexpected , output="/var/spool/amavisd/tmp/amavis-20131028T061453-01771/parts: lstat() failed: Permission denied. ERROR\n"
Oct 28 06:14:53 www amavis[1771]: (01771-01) (!)ClamAV-clamd av-scanner FAILED: CODE(0x46a4448) unexpected , output="/var/spool/amavisd/tmp/amavis-20131028T061453-01771/parts: lstat() failed: Permission denied. ERROR\n" at (eval 103) line 596.
Oct 28 06:14:53 www amavis[1771]: (01771-01) (!!)WARN: all primary virus scanners failed, considering backups

反垃圾邮件貌似没有扫描测试的邮件,导致反垃圾没有启动,版本是iredmail0.8.5的

回复: spamassassin反垃圾邮件支持中文标题过滤不?

ClamAV 无法启动。是不是更新了 ClamAV 软件?贴一下这个命令的输出:

# rpm -qi clamav

回复: spamassassin反垃圾邮件支持中文标题过滤不?

Name        : clamav                       Relocations: (not relocatable)
Version     : 0.97.7                            Vendor: Dag Apt Repository, http://dag.wieers.com/apt/
Release     : 1.el6.rf                      Build Date: Wed 20 Mar 2013 08:09:50 PM CST
Install Date: Sun 27 Oct 2013 05:54:53 AM CST      Build Host: lisse.hasselt.wieers.com
Group       : Applications/System           Source RPM: clamav-0.97.7-1.el6.rf.src.rpm
Size        : 6138641                          License: GPL
Signature   : DSA/SHA1, Wed 20 Mar 2013 11:59:20 PM CST, Key ID a20e52146b8d79e6
Packager    : Dag Wieers <dag@wieers.com>
URL         : http://www.clamav.net/
Summary     : Anti-virus software
Description :
Clam AntiVirus is a GPL anti-virus toolkit for UNIX. The main purpose of
this software is the integration with mail servers (attachment scanning).
The package provides a flexible and scalable multi-threaded daemon, a
command line scanner, and a tool for automatic updating via Internet.

The programs are based on a shared library distributed with the Clam
AntiVirus package, which you can use with your own software. Most
importantly, the virus database is kept up to date

6 最后由 kouty (2013-10-28 23:01:39) 编辑

回复: spamassassin反垃圾邮件支持中文标题过滤不?

这是logwatch 邮件日志:

--------------------- clam-update Begin ------------------------

No updates detected in the log for the freshclam daemon (the
ClamAV update process).  If the freshclam daemon is not running,
you may need to restart it.  Other options:

A. If you no longer wish to run freshclam, deleting the log file
    (default is freshclam.log) will suppress this error message.

B. If you use a different log file, update the appropriate
    configuration file.  For example:
       echo "LogFile = log_file" >> /etc/logwatch/conf/logfiles/clam-update.conf
    where log_file is the filename of the freshclam log file.

C. If you are logging using syslog, you need to indicate that your
    log file uses the syslog format.  For example:
       echo "*OnlyService = freshclam" >> /etc/logwatch/conf/logfiles/clam-update.conf
       echo "*RemoveHeaders" >> /etc/logwatch/conf/logfiles/clam-update.conf

---------------------- clam-update End -------------------------

回复: spamassassin反垃圾邮件支持中文标题过滤不?

贴一下输出:

# grep 'clam' /etc/passwd
# ls -l /etc/clam*
# ls -l /etc/freshclam*

8 最后由 kouty (2013-10-29 18:11:36) 编辑

回复: spamassassin反垃圾邮件支持中文标题过滤不?

谢谢张工,Clam这个错误我解决了,是因为我更换了主机名,没有切换回去导致的。

关于主要问题的答案:spamassassin是支持中文过滤的,关键在于安装CentOs系统的时候,选择中文版系统、US键盘;

请关闭此贴,谢谢!

回复: spamassassin反垃圾邮件支持中文标题过滤不?

kouty 写道:

关于主要问题的答案:spamassassin是支持中文过滤的,关键在于安装CentOs系统的时候,选择中文版系统、US键盘;

你重装了系统解决了中文过滤的问题?我不认为是这个原因导致的。

10 最后由 kouty (2013-10-30 10:31:54) 编辑

回复: spamassassin反垃圾邮件支持中文标题过滤不?

不知是不是虚拟机(vmware9.0.2)的问题:我又一次重装了iredmail0.8.5,安装完成后:出现新的报错邮件。

邮件标题:Anacron job 'cron.daily' on www.****.tk
邮件正文:
/etc/cron.daily/freshclam:

connect(): No such file or directory

之前的Can't open perl script "/usr/share/awstats/wwwroot/cgi-bin/awstats.pl": No such file or directory报错邮件每隔1小时继续收到。

Post's attachments

QQ图片20131030100705.jpg 50.64 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

回复: spamassassin反垃圾邮件支持中文标题过滤不?

Awstats 的这个问题是 iRedMail 的 bug,正在修复中。

12 最后由 kouty (2013-10-30 11:17:26) 编辑

回复: spamassassin反垃圾邮件支持中文标题过滤不?

kouty 写道:

Clam这个错误我解决了,是因为我更换了主机名,没有切换回去导致的。

我收回这个说法,在我没有修改主机名的情况下只开启了main.cf中header_checks参数,日志中又出现了clam错误日志:
Oct 27 07:01:02 www amavis[1626]: (01626-01) (!)run_av (ClamAV-clamd) FAILED - unexpected , output="/var/spool/amavisd/tmp/amavis-20131027T070102-01626/parts: lstat() failed: Permission denied. ERROR\n"
Oct 27 07:01:02 www amavis[1626]: (01626-01) (!)ClamAV-clamd av-scanner FAILED: CODE(0x3327418) unexpected , output="/var/spool/amavisd/tmp/amavis-20131027T070102-01626/parts: lstat() failed: Permission denied. ERROR\n" at (eval 103) line 596.
Oct 27 07:01:02 www amavis[1626]: (01626-01) (!!)WARN: all primary virus scanners failed, considering backups
Oct 27 07:01:02 www amavis[1625]: (01625-01) (!)run_av (ClamAV-clamd) FAILED - unexpected , output="/var/spool/amavisd/tmp/amavis-20131027T070102-01625/parts: lstat() failed: Permission denied. ERROR\n"
Oct 27 07:01:02 www amavis[1625]: (01625-01) (!)ClamAV-clamd av-scanner FAILED: CODE(0x3327418) unexpected , output="/var/spool/amavisd/tmp/amavis-20131027T070102-01625/parts: lstat() failed: Permission denied. ERROR\n" at (eval 103) line 596.
Oct 27 07:01:02 www amavis[1625]: (01625-01) (!!)WARN: all primary virus scanners failed, considering backups


Oct 27 07:38:27 www amavis[1626]: (01626-02) (!)run_av (ClamAV-clamd) FAILED - unexpected , output="/var/spool/amavisd/tmp/amavis-20131027T070102-01626/parts: lstat() failed: Permission denied. ERROR\n"
Oct 27 07:38:27 www amavis[1626]: (01626-02) (!)ClamAV-clamd av-scanner FAILED: CODE(0x3327418) unexpected , output="/var/spool/amavisd/tmp/amavis-20131027T070102-01626/parts: lstat() failed: Permission denied. ERROR\n" at (eval 103) line 596.
Oct 27 07:38:27 www amavis[1626]: (01626-02) (!!)WARN: all primary virus scanners failed, considering backups

系统时间是10月27日,因为我安装完CentOs6.4后在虚拟机里做了快照,然后从快照下安装的iredmail0.8.5

回复: spamassassin反垃圾邮件支持中文标题过滤不?

ZhangHuangbin 写道:

Awstats 的这个问题是 iRedMail 的 bug,正在修复中。

刚才重新测试了一次,发现是安装的 Awstats 不同导致的。默认应该安装 EPEL 仓库的包,而不是 iRedMail 仓库的。如果是 EPEL,则没有此问题。不确定为何你的会是 iRedMail 仓库的包。

回复: spamassassin反垃圾邮件支持中文标题过滤不?

我安装的时候是按照教程里的将pkgs/get_all.sh文件中所有的iredmail.org改成173.254.22.21了:会不是是这个问题造成的?
如:
# Where to fetch/store binary packages and source tarball.
export MIRROR='http://173.254.22.21/yum'
export PKG_DIR="${ROOTDIR}/pkgs"
.
.
.
name=${LOCAL_REPO_NAME}
baseurl=http://173.254.22.21/yum/rpms/${DISTRO_VERSION}/
enabled=1
.
.
.
name=iRedMail-Dovecot-12
baseurl=http://173.254.22.21/yum/rpms/dovecot/rhel${DISTRO_VERSION}/
enabled=1
.
.
.
    # iRedMail version number, OS distribution, release version, code name, backend.
    ECHO_INFO "Checking new version of iRedMail ..."
    ${FETCH_CMD} "http://173.254.22.21/version/check.py/i … _CODENAME}" &>/dev/null

回复: spamassassin反垃圾邮件支持中文标题过滤不?

kouty 写道:

我安装的时候是按照教程里的将pkgs/get_all.sh文件中所有的iredmail.org改成173.254.22.21了:会不是是这个问题造成的?

这个没有关系。因为它会自动添加 EPEL 仓库。