ExtMail服务器社区's Archiver

yg0898 发表于 2010-1-23 20:42

更新到emos-1.5之后,postmaster没有收到日志报告-1.5没装logwatch

如题,我原来用的是emos-1.3,postmaster每天都会收到一份关于服务器的日记邮件LogWatch for XXX.com

前几天更新到emos-1.5之后,再也没有收到这样的日记邮件了?

请问各位高人需要配置哪个文件呢?

[[i] 本帖最后由 yg0898 于 2010-1-24 19:52 编辑 [/i]]

yg0898 发表于 2010-1-24 17:15

有可能自己的postmaster后面的域名不是写当前使用的域名..

今天修改了webman.cf中的postmaster帐号,明天再检查是否收到邮件.

yg0898 发表于 2010-1-24 18:44

晕倒,原来emos-1.5没有安装logwatch,现在我正在安装中....

yg0898 发表于 2010-1-24 19:51

还需要配置logwatch.conf

最后在crontab中加入计划运行每天凌里12点发日志到指定的邮箱.

重启系统。。。明天再来check email....

yg0898 发表于 2010-1-24 20:30

附上配置logwatch实例

下载logwatch
wget [url]ftp://ftp.kaybee.org/pub/redhat/RPMS/noarch/logwatch-7.3.6-1.noarch.rpm[/url]

安装logwatch
rpm -ivh logwatch-7.3.6-1.noarch.rpm

配置logwatch.conf
vi /etc/logwatch/conf/logwatch.conf

# Local configuration options go here (defaults are in /usr/share/logwatch/default.conf/logwatch.conf)
#Example for logwatch configuration
LogDir = /var/log
TmpDir = /var/cache/logwatch
MailTo = [email]a@163.com[/email],[email]a@yahoo.com.cn[/email] //多个邮箱用逗号隔开,这个为接收日志的邮箱.
MailFrom = Logwatch-test(192.168.2.110)
Print = No
Range = yesterday
Detail = Med
Service = All
Service = "-zz-network"
Service = "-zz-sys"
Service = "-eximstats"
mailer = "sendmail -t"  //这个搞不懂要不要换为postfix,因为emos1.5没有装sendmail

让系统定时给指定邮箱发送邮件:
vi /usr/local/sbin/logwatch.sh
#!/usr/bin/perl
perl /usr/share/logwatch/scripts/logwatch.pl
#chmod u+x /usr/local/sbin/logwatch.sh

#crontab -e
加入:0 0 * * * /usr/local/sbin/logwatch.sh > /dev/null 2>&1


不知道是否会成功

这样系统每天的0点就会给指定邮箱系统发送系统日志……

[[i] 本帖最后由 yg0898 于 2010-1-24 20:32 编辑 [/i]]

liushaobo 发表于 2010-1-24 22:57

postmaster received log mail there is a script,In the extman/tools/ directory

yg0898 发表于 2010-1-25 09:50

extman/tools/目录下有好几个.pl文件
当前的emos1.5的crontab -e 中只用了两个pl文件,分别是
0 4 * * * /var/www/extsuite/extman/tools/expireusers.pl -all [email]abc@123.com[/email]
30 4 * * * /var/www/extsuite/extman/tools/reportusage.pl -all /home/domains [email]abc@123.com[/email]

这两个应该是用户状态报告和用户邮箱容量使用状态,logwatch并不在其中。
昨天的logwatch配置计划凌晨发送日志到指定的邮箱,今天查看了邮箱,果真进来了logwatch的邮件。

enjoylinux 发表于 2010-1-25 11:06

是的裁剪了,我记录下来了以便下个版本改进。

不过postfix-pflogsumm 这东西都不错。

rosvpn 发表于 2010-1-25 18:16

很好,等着2.0

mouse 发表于 2010-2-6 08:22

强等2.0呀!

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.