EMOS无法接收邮件故障处理
单位安装的EMOS邮件服务器最近突然发现无法接受邮件。查看日志:
代码
cat /var/log/maillog
……
ClamAV-clamscan av-scanner FAILED: /usr/bin/clamscan DIED on signal 11 (000b) at (eval 56) line 462.
TROUBLE in check_mail: virus_scan FAILED: virus_scan: ALL VIRUS SCANNERS FAILED: ClamAV-clamd av-scanner FAILED: Too many retries to talk to /var/run/clamav/clamd.sock (Can't connect to UNIX socket /var/run/clamav/clamd.sock: No such file or directory) at (eval 56) line 268.; ClamAV-clamscan av-scanner FAILED: /usr/bin/clamscan DIED on signal 11 (000b) at (eval 56) line 462.
……
……
ClamAV-clamscan av-scanner FAILED: /usr/bin/clamscan DIED on signal 11 (000b) at (eval 56) line 462.
TROUBLE in check_mail: virus_scan FAILED: virus_scan: ALL VIRUS SCANNERS FAILED: ClamAV-clamd av-scanner FAILED: Too many retries to talk to /var/run/clamav/clamd.sock (Can't connect to UNIX socket /var/run/clamav/clamd.sock: No such file or directory) at (eval 56) line 268.; ClamAV-clamscan av-scanner FAILED: /usr/bin/clamscan DIED on signal 11 (000b) at (eval 56) line 462.
……
检查clamd服务没有启动。原来是clamd的版本太老,病毒库无法更新导致无法启动。上网搜索解决方案,修改yum设置:
代码
一、增加dag
#vi /etc/yum.repos.d/dag.repo
二、在dag.repo中增加以下代码:
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
三、执行命令:
# rpm --import http://apt.sw.be/packages/RPM-GPG-KEY.dag.txt
# yum update clamav
#vi /etc/yum.repos.d/dag.repo
二、在dag.repo中增加以下代码:
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
三、执行命令:
# rpm --import http://apt.sw.be/packages/RPM-GPG-KEY.dag.txt
# yum update clamav
因为无法获取GPG-KEY,于是修改gpgcheck=0,yum update成功。
GPG文件路径改变,修改成:
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
启动clamd服务成功。
检查邮件接受正常,大功告成。