![使用 CentOS 8 的具有病毒和垃圾邮件防护功能的邮件服务器](https://linux22.com/image/752364/%E4%BD%BF%E7%94%A8%20CentOS%208%20%E7%9A%84%E5%85%B7%E6%9C%89%E7%97%85%E6%AF%92%E5%92%8C%E5%9E%83%E5%9C%BE%E9%82%AE%E4%BB%B6%E9%98%B2%E6%8A%A4%E5%8A%9F%E8%83%BD%E7%9A%84%E9%82%AE%E4%BB%B6%E6%9C%8D%E5%8A%A1%E5%99%A8.png)
我一直在使用 CentOS 8 作为基础 Linux 发行版构建一个简单的邮件服务器。但是,我遇到了一个问题,我无法让病毒扫描程序与 Postfix 正确配合使用。
我已经安装了以下软件:
Postfix v3.3.1 Amavisd-new v2.12.0-1 ClamAV v0.102.2-4 Spamassassin v3.4.2-6(由 Amavisd-new 安装)Postgrey v1.37-9
一切似乎都安装顺利,没有错误。在安装 amavisd-new 和 ClamAV 之前,邮件服务器运行正常。
每当我发送电子邮件时,邮件日志中都会出现以下错误:
May 12 14:02:21 1tmail amavis[1099]: (01099-02) (!)connect to /var/run/clamd.amavisd/clamd.sock failed, attempt #1: Can't connect to a UNIX socket /var/run/clamd.amavisd/clamd.sock: No such file or directory
May 12 14:02:23 1tmail amavis[1099]: (01099-02) (!)connect to /var/run/clamd.amavisd/clamd.sock failed, attempt #1: Can't connect to a UNIX socket /var/run/clamd.amavisd/clamd.sock: No such file or directory
May 12 14:02:23 1tmail amavis[1099]: (01099-02) (!)ClamAV-clamd: All attempts (1) failed connecting to /var/run/clamd.amavisd/clamd.sock, retrying (2)
May 12 14:02:29 1tmail amavis[1099]: (01099-02) (!)connect to /var/run/clamd.amavisd/clamd.sock failed, attempt #1: Can't connect to a UNIX socket /var/run/clamd.amavisd/clamd.sock: No such file or directory
May 12 14:02:29 1tmail amavis[1099]: (01099-02) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamd.amavisd/clamd.sock (All attempts (1) failed connecting to /var/run/clamd.amavisd/clamd.sock) at (eval 98) line 659.\n
May 12 14:02:29 1tmail amavis[1099]: (01099-02) (!)WARN: all primary virus scanners failed, considering backups
文件 clamd.sock 无法位于服务器上的任何地方,并且我不确定为什么或哪里出现了问题。
我遵循以下指南进行安装:https://www.server-world.info/en/note?os=CentOS_8&p=mail&f=7
我已经在 Google 和其他论坛中搜索修复方法,但没有找到任何可行的修复方法。
我将非常感激任何关于如何解决这一问题的建议或指导。
答案1
确保安装了以下所有软件包,可能有一两个软件包您不需要。这只是从我上次安装的笔记中复制而来,我记得我遇到了同样的问题,我缺少一个软件包,我将其添加到我的笔记中,但我不记得具体是哪一个了。
dnf -y 安装 amavisd-new spamassassin clamav-服务器 clamav-数据 clamav-更新 clamav-文件系统 clamav clamav-扫描仪-系统d clamav-devel clamav-lib clamav-服务器-系统d 解压缩 bzip2 perl-DBD-mysql postgrey re2c sa-更新