CentOS編輯安裝amavisd-new與修改內(nèi)容
經(jīng)過長時(shí)間學(xué)習(xí)CentOS編輯安裝amavisd-new,你可能會(huì)遇到CentOS編輯amavisd-new問題,CentOS Linux由于同時(shí)具有與RHEL的兼容性和企業(yè)級(jí)應(yīng)用的穩(wěn)定性,又允許用戶自由使用,因此得到了越來越廣泛的應(yīng)用。這里將介紹CentOS編輯amavisd-new問題的解決方法。
CentOS編輯安裝amavisd-new/etc/yum.repos.d/CentOS-Base.repo 加入下面的內(nèi)容:
[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,修改下面的內(nèi)容
$mydomain = 'yiyou.org'; # a convenient default for other settings
把下面內(nèi)容去掉注釋,并修改為下面
['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 增加下面的內(nèi)容:
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 加入下面的內(nèi)容
content_filter = smtp-amavis:[localhost]:10024
[root@localhost ~]# service postfix reload
【編輯推薦】