免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3587 | 回复: 0

[Mail] 在 FreeBSD 下安装 postfix、courier-imap 邮件服务器(第四部分:杀毒功能) [复制链接]

论坛徽章:
0
发表于 2010-01-29 17:44 |显示全部楼层
本帖最后由 iheaing 于 2010-02-01 15:14 编辑

(一)声明:

(1)我在安装过程中,发现大量网站的转贴有排版格式超烂的问题。
所以本文只有 www.chinaunix.netwww.freebsdchina.org
发表,不准转贴!如果你藐视这个声明,转贴时请注意文章格式。
(2)如果你的回复少于十个字,请再三考虑是否有回复的必要。


(二)感谢:

作者iheaing感谢 google.com、CU mail论坛的诸位版主、各软件的开发者和……。


(三)安装

杀毒部分选择了 clamav,postfix 通过 clamsmtp 使用 clamav。

# cd /usr/ports/security/clamav
# make install clean


确定选择 [arc] [arj] [lha] [unzoo] [unrar],我安装时为 clamav-0.95.3 版本。

# cd /usr/ports/security/clamsmtp/
# make install clean



(四)设置

详情: http://memberwebs.com/stef/software/clamsmtp/postfix.html

(1)修改 /etc/rc.conf

clamav_clamd_enable="YES"
clamav_freshclam_enable="YES"
clamsmtpd_enable="YES"


(2)修改 /usr/local/etc/postfix/master.cf

scan    unix    -       -       n       -       16      smtp
  -o smtp_send_xforward_command=yes
  -o smtp_enforce_tls=no
192.168.1.2:10026    inet    n       -       n       -       16      smtpd
  -o content_filter=
  -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
  -o smtpd_helo_restrictions=
  -o smtpd_client_restrictions=
  -o smtpd_sender_restrictions=
  -o smtpd_recipient_restrictions=permit_mynetworks,reject
  -o mynetworks_style=host
  -o smtpd_authorized_xforward_hosts=127.0.0.0/8


(3)修改 /usr/local/etc/postfix/main.cf

content_filter = scan:192.168.1.2:10025


(4)修改 /usr/local/etc/clamstmpd.conf

OutAddress: 10026
Listen: 192.168.1.2:10025
ClamAddress: /var/run/clamav/clamd.sock
TempDirectory: /tmp
User: clamav


(5)修改 clamsmtpd.pid 的权限。

# chmod g+w /var/run/clamav/clamsmtpd.pid
# ls -l
-rw-rw-r--  1 clamav  clamav     4B Jan 27 17:39 clamd.pid
srwxrwxrwx  1 clamav  clamav     0B Jan 27 17:39 clamd.sock
-rw-rw-r--  1 root    clamav     5B Jan 27 17:39 clamsmtpd.pid
-rw-rw----  1 clamav  clamav     4B Jan 27 17:39 freshclam.pid


[ 本帖最后由 iheaing 于 2010-1-29 17:59 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP