OpenBSD 5.0 release spamd使用心得

在OpenBSD环境下搭建各种服务器的相关讨论。

版主: lionuxchenjun天地乾坤

回复
f5b
锆 Zr
帖子: 643
注册时间: 2011-10-22 20:43

OpenBSD 5.0 release spamd使用心得

帖子 f5b » 2011-11-29 17:36

OpenBSD 5.0 release spamd使用心得

首先请看2个地方
1. man spamd
2. https://calomel.org/spamd_config.html

一、简单应用:仅启用白名单和灰名单
whitelisted hosts do not talk to spamd. Their connections are instead
sent to a real mail server, such as sendmail(8).

greylisted hosts are redirected to spamd, but spamd has not yet decided
if they are likely spammers. They are given a temporary failure message
by spamd when they try to deliver mail.

1. /etc/rc.conf.local
spamd_flags="-v" ,记录详尽信息才启用-v

2. /etc/syslog.conf
!!spamd
daemon.err;daemon.warn;daemon.info /var/log/spamd
!*

注意:
以上3行必须放在syslog.conf头部!
两个叹号表示spamd程序的日志只保存在/var/log/spamd,不出现在/var/log/daemon
!*结尾可保证其它log可以继续保存


详情请man syslog.conf
The syslog.conf file is the configuration file for the syslogd(8)
program. It consists of blocks of lines separated by program
specifications, with each line containing two fields: the selector field
which specifies the types of messages and priorities to which the line
applies, and an action field which specifies the action to be taken if a
message syslogd receives matches the selection criteria. The selector
field is separated from the action field by one or more tab(用tab分割,否则无效) characters.

3. /etc/pf.conf
去掉#符号
# rules for spamd(8)
#table <spamd-white> persist
#table <nospamd> persist file "/etc/mail/nospamd"
#pass in on egress proto tcp from any to any port smtp \
# rdr-to 127.0.0.1 port spamd
#pass in on egress proto tcp from <nospamd> to any port smtp
#pass in log on egress proto tcp from <spamd-white> to any port smtp
#pass out log on egress proto tcp to any port smtp

记得手工添加/etc/mail/nospamd文件


4. 不用黑名单
Checking /etc/mail/spamd.conf

The spamd.conf file is used to list out black list files. We do _not_ suggest using blacklist because of the unknowns involved in their collection. We do not know what affiliations the people collecting the ips may have or their agenda. To be safe we suggest avoiding blacklists. Use spamd to make your own lists.

The following is all you need in your /etc/mail/spamd.conf as to void out all black lists.

all:\
::

------------------

5. 重新启动计算机即可。


更多高级应用请openports.se
搜索discription: spamd or grey

spamd检查后后期还要开启amavisd=spamassassin + clamav

头像
leo
帖子: 2465
注册时间: 2010-01-21 3:27

回复: OpenBSD 5.0 release spamd使用心得

帖子 leo » 2011-11-30 12:30

一直没有时间搭建邮件服务器,学习一下,感谢楼主分享经验。

回复

在线用户

正浏览此版面之用户: 没有注册用户 和 2 访客