扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
#保存退出
touch /etc/syspasswd.dat
chown -R vpopmail.vchkpw /usr/local/apps/www/igenus/
chmod -R 755 /usr/local/apps/www/igenus/
#解决出现不能执行查询(query): SELECT * FROM admin ORDER BY id ASC LIMIT -20, 20,修改
vi /usr/local/apps/www/igenus/admin/sys/index.php
--------------------------------
$start_row = ($get_page - 1)*$CFG_NUMOFPAGE;
修改成
if ($get_page == 0) {
$start_row = $get_page*$CFG_NUMOFPAGE;
}
else{
$start_row = ($get_page - 1)*$CFG_NUMOFPAGE;
}
--------------------------------
#保存退出
#登录设置页面,用户:Admin密码Admin来登录.注意A要大写..这个管理帐号密码登录后可以改的
http://mail.51divx.com/admin/sys/
#登录后,首先点"更新数据库"你就会看见你的域名.然后点"编辑"把"登录权限 该域管理员(Postmaster)有权登录进行用户管理"这一项打勾,确认后,就可以用
http://domain.com/admin/
来登录管理了。
#安装Clamav
#添加所需的组和用户
groupadd clamav
useradd -g clamav -s /bin/false clamav
#安装软件
cd /home/pkg
tar xzvf clamav-0.83.tar.gz
cd clamav-0.83
./configure --disable-zlib-vcheck
make check
make install
#测试Clamav
clamscan --recursive --log=/tmp/clamscan.log ./ //扫描当前目录,测试clamscn是否运行
cat /tmp/clamscan.log
#更改/usr/local/etc/freshclam.conf文件,去掉下面选项前面的#:
vi /usr/local/etc/freshclam.conf
--------------------------------
#Example \\前面加上#
UpdateLogFile /var/log/freshclam.log \\去掉前面的#
LogSyslog \\去掉前面的#
PidFile /var/run/freshclam.pid \\去掉前面的#
--------------------------------
#更改/usr/local/etc/clamd.conf文件,去掉下面选项前面的#:
vi /usr/local/etc/clamd.conf
--------------------------------
#Example \\前面加上#
LogFile /var/log/clamav/clamd.log \\去掉前面的# ???
LogFileMaxSize 2M \\去掉前面的#
LogTime \\去掉前面的#
PidFile /var/run/clamd.pid \\去掉前面的#
LogSyslog \\去掉前面的#
ScanMail \\去掉前面的#
--------------------------------
touch /var/log/freshclam.log
chmod 644 /var/log/freshclam.log
chown clamav:clamav /var/log/freshclam.log
mkdir /var/lib/clamav
chown clamav:clamav /var/lib/clamav
#升级clamscan病毒库
freshclam --verbose
#把freshclam加入crontab 定时更新病毒库,自动扫描/home目录
crontab -e
--------------------------------
0 1 * * * freshclam --quiet -l /var/log/freshclam.log
0 6 * * * /usr/local/bin/clamscan --recursive --infected --exclude /usr/local/share/clamav/viruses.db --exclude /usr/local/share/clamav/viruses.db2 --log=/var/log/clamscan.log /home
--------------------------------
#创建freshclam日志记录文件
mkdir -p /var/log/clamav
touch /var/log/clamav/clamd.log
chown clamav.clamav -R /var/log/clamav/
chmod 644 -R /var/log/clamav/
#创建clamav启动脚本
vi /etc/rc.d/init.d/clamav
--------------------------------
#!/bin/sh
#
# Startup / shutdown script for Clam Antivirus
case "$1" in
start)
/usr/local/sbin/clamd && echo -n 'Clamd started'
/usr/local/bin/freshclam -d -c 2 -l /var/log/freshclam.log
echo -n ' freshclam started'
;;
stop)
/usr/bin/killall clamd > /dev/null 2>&1 && echo -n 'Clamd stoped'
/usr/bin/killall freshclam > /dev/null 2>&1 && echo -n ' freshclam Stoped'
;;
*)
echo ""
echo "Usage: `basename $0` { start | stop }"
echo ""
exit 64
;;
esac
------------------------------------
#使其能够执行
chmod 755 /etc/init.d/clamav
#随开机起动
ln -s /etc/init.d/clamav /etc/rc.d/rc3.d/S88clamav
ln -s /etc/init.d/clamav /etc/rc.d/rc5.d/S88clamav
#安装 SpamAssassin
# 安装Time-HiRes perl模块
cd /var/src
# 注意: 如果你是第一次运行CPAN,你将会被问一系列的问题.
# 大部分问题默认就行了.
perl -MCPAN -e'shell'
cpan> install Time::HiRes
cpan> exit
# 安装SpamAssassin
cd /var/src
tar -xzf tar/Mail-SpamAssassin-2.31.tar.gz
cd Mail-SpamAssassin-2.31
perl Makefile.PL
make
make install
#修改起动脚本使spamassassin支持vpopmail
#修改如下一行:
vi /etc/init.d/spamassassin
SPAMDOPTIONS="-d -c -m5 -H -x -u spamd -v"
vi /etc/sysconfig/spamassassin
SPAMDOPTIONS="-d -c -m5 -H -x -u spamd -v"
#spamassassin的过滤模板在/etc/mail/spamassassin/local.cf,修改为:
vi /etc/mail/spamassassin/local.cf
-------------------------------
required_score 5.0
rewrite_header Subject ********SPAM********
report_safe 1
use_bayes 1
skip_rbl_checks 0
ok_languages zh en
ok_locales en ko
score HEAD_ILLEGAL_CHARS 0
score SUBJ_ILLEGAL_CHARS 0
score DATE_IN_PAST_03_06 0
score UPPERCASE_25_50 0
score UPPERCASE_50_75 0
score UPPERCASE_75_100 0
score X_MSMAIL_PRIORITY_HIGH 0
score X_PRIORITY_HIGH 0
score TO_TXT 100
score RATWARE_HASH_2 100
score RATWARE_HASH_2_V2 100
score BAYES_99 0.1
score BAYES_80 0.1
score BAYES_60 0.1
score FROM_ILLEGAL_CHARS 0.1
score MIME_BASE64_TEXT 0.1
score NO_RDNS_DOTCOM_HELO 0.1
score CHINA_HEADER 0.1
score NO_REAL_NAME 0.2
score HTML_MESSAGE 0.2
score MIME_HTML_ONLY 0.2
score MIME_HTML_ONLY_MULTI 0.2
score FORGED_MUA_OUTLOOK 0.2
score FORGED_HOTMAIL_RCVD 0.2
score FORGED_OUTLOOK_TAGS 0.2
score MAILTO_TO_SPAM_ADDR 0.2
#黑白名单
whitelist_from *@domain.com
# ---------------------------------------------------------------------------
# 使用中国反垃圾邮件联盟的CBL/CDL
# URL: http://www.anti-spam.org.cn/
header RCVD_IN_CBL eval:check_rbl('cbl', 'cbl.anti-spam.org.cn.')
describe RCVD_IN_CBL Received via a relay in cbl.anti-spam.org.cn
tflags RCVD_IN_CBL net
header RCVD_IN_CDL eval:check_rbl('cdl-notfirsthop', 'cdl.anti-spam.org.cn.')
describe RCVD_IN_CDL CDL: dialup sender did non-local SMTP
tflags RCVD_IN_CDL net
#SCORE
score RCVD_IN_CBL 4.0
score RCVD_IN_CDL 3.0
--------------------------------------
#运行ntsysv,将spamassassin设定的为开机运行
#使用CCERT 中文垃圾邮件过滤规则集Chinese_rules.cf
wget -N -P /usr/share/spamassassin www.ccert.edu.cn/spam/sa/Chinese_rules.cf
#添加SpamAssasin服务启动必须的用户
useradd spamd
#启动SpamAssassin
service spamassassin start
#定期自动更新中文反垃圾邮件规则
crontab –e
#加入
0 0 1 * * wget -N -P /usr/share/spamassassin www.ccert.edu.cn/spam/sa/Chinese_rules.cf;/etc/init.d/spamassassin restart;/etc/init.d/spamassassin restart;
#建立SpamAssassin的学习系统
sa-learn --sync -D -p user_prefs
#查看自学习的数据信息
sa-learn --dump all
#查看调试信息
spamassassin --lint –D
#进行一个spam和non-spam的测试
spamassassin -t < sample-spam.txt > spamtest.txt
less spamtest.txt
spamassassin -t < sample-nonspam.txt > nospamtest.txt
less nospamtest.txt
#spamtest.txt文件在主题一段中将包含"*****SPAM*****" 这一行, 而nospamtest.txt文件中则没有.
OK了,到次qmail的主要模块都装上了,要实测正常收发,请注意将你正式域名的MX记录指向过来。 |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。