ubuntu – 禁用Amavis的ClamAV

前端之家收集整理的这篇文章主要介绍了ubuntu – 禁用Amavis的ClamAV前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个Postfix邮件服务器,使用Amavis和Spamassassin检查不需要的电子邮件.我已经删除了ClamAV,因为每当有人收到电子邮件时,它基本上都会冻结整个服务器,而服务器端病毒扫描似乎对我的用例并不重要.

Spamassassin仍由Amavis引发,我想保持这种状态.
基本上我想要的是Amavis停止尝试为每封电子邮件触发一个virusscan.

May 29 07:49:14 robinj amavis[19859]: (19859-01) (!)connect to /tmp/clamd.socket Failed,attempt #1: Can't connect to UNIX socket /tmp/clamd.socket: No such file or directory
May 29 07:49:15 robinj amavis[19859]: (19859-01) (!)connect to /tmp/clamd.socket Failed,attempt #1: Can't connect to UNIX socket /tmp/clamd.socket: No such file or directory
May 29 07:49:15 robinj amavis[19859]: (19859-01) (!)ClamAV-clamd: All attempts (1) Failed connecting to /tmp/clamd.socket,retrying (2)
May 29 07:49:21 robinj amavis[19859]: (19859-01) (!)connect to /tmp/clamd.socket Failed,attempt #1: Can't connect to UNIX socket /tmp/clamd.socket: No such file or directory
May 29 07:49:21 robinj amavis[19859]: (19859-01) (!)ClamAV-clamd av-scanner Failed: run_av error: Too many retries to talk to /tmp/clamd.socket (All attempts (1) Failed connecting to /tmp/clamd.socket) at (eval 139) line 603.\n
May 29 07:49:21 robinj amavis[19859]: (19859-01) (!)WARN: all primary virus scanners Failed,considering backups
May 29 07:49:21 robinj amavis[19859]: (19859-01) (!!)AV: ALL VIRUS SCANNERS Failed

我已经尝试在/etc/amavis/conf.d/15-av_scanners中评论了几个选项,但它开始看起来如果我发表评论它只是使用默认配置的那个与那个是相同的首先是在那里.

# ['ClamAV-clamd',#   \&ask_daemon,["CONTSCAN {}\n","/var/run/clamav/clamd.ctl"],#   qr/\bOK$/m,qr/\bFOUND$/m,#   qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],

正如您所看到的,这是注释掉的.因此,它只是寻找备份扫描仪,其中没有一个存在.但是,这仍然会使用上述消息阻止日志并延迟邮件传递.
注释掉备份扫描仪对此没有任何影响(事实上,当它被注释掉时,它仍然会触发过去存在的东西).

如何配置Amavis仍然使用Spamassassin,但是停止尝试扫描每封电子邮件中的病毒?

由于您要完全禁用病毒检查,最简单的方法是在Amavis配置文件(amavis.conf或conf.d / 50-user)中找到@bypass_virus_checks_maps行并将其更改为此;
bypass_virus_checks_maps => [1];
原文链接:https://www.f2er.com/ubuntu/347813.html

猜你在找的Ubuntu相关文章