经过长时间学习CentOS编辑安装amavisd-new,你可能会遇到CentOS编辑amavisd-new问题,CentOS Linux由于同时具有与RHEL的兼容性和企业级应用的稳定性,又允许用户自由使用,因此得到了越来越广泛的应用。这里将介绍CentOS编辑amavisd-new问题的解决方法。
CentOS编辑安装amavisd-new/etc/yum.repos.d/CentOS-Base.repo 加入下面的内容:
[dag]
name=Dag RPM Repostory for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
gpgkey=http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
[root@localhost ~]# yum -y install clamav clamav-db clamd clamav-devel amavisd-new
CentOS编辑/etc/amavisd.conf,修改下面的内容
$mydomain = 'yiyou.org'; # a convenient default for other settings
把下面内容去掉注释,并修改为下面
['ClamAV-clamd',
\&ask_daemon, ["CONTSCAN {}\n", "/tmp/clamd.socket"],
qr/\bOK$/, qr/\bFOUND$/,
qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
[root@localhost ~]# usermod -G amavis clamav
[root@localhost ~]# service clamd start
在CentOS编辑/etc/postfix/master.cf 增加下面的内容:
smtp-amavis unix - - n - 4 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
127.0.0.1:10025 inet n - n - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o receive_override_options=no_header_body_checks
在CentOS编辑/etc/postfix/main.cf 加入下面的内容
content_filter = smtp-amavis:[localhost]:10024
[root@localhost ~]# service postfix reload
【编辑推荐】